I had a dim memory about this and found this link
http://www.objectmatter.com/vbsf/docs/maptool/ormapping.html which
describes three
ways (which as I recall are the standard ways) to map an object
hierarchy onto relational tables.
None of the ways seem very pretty but as Kurt says there is what
You're mixing two metaphors and will run into troubles, just accept
that relational databases are not an inherited object model.
But to answer your question consider the following:
table PetType:
int id
string name
int number_of_legs
table Pet
int id
int type_id // foreign key
I am fairly new to Django. I have a strong background in object
oriented design, but only a shallow familiarity with relational
database design. I am trying to develop my models and I have a sort
of general philosophical question about what the ORM is capable of,
and how it should be used.
So l
3 matches
Mail list logo