[SQLObject] How do I map this inheritance?
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <jpa...@ya...> - 2005-02-18 14:54:21
|
Hi! In my application I need to model a base Person class and some inherited classes, like Student and Professor, both subclasses of Person. My problem is that one Person can be both Student and Professor at the same time. Also, a Person can be neither Student nor a Professor in a first step, but it can became a Student or a Professor (or both) at some later time. How should I do this? Is inheritance a good approach for that? or should I just use ForeignKey's on Student and Professor pointing to Person? Thanks in advance, João Paulo Farias jpa...@ya... |