On Mon, Feb 06, 2006 at 01:32:08PM -0800, Al Pacifico wrote:
> 1. Are the problems with person.childName =
> "Consultant" likely or severe enough to justify that?
> I don't anticipate this sort of change being made
> often, but it would be made sometimes...

   I think you may encounter problems with cache - you can get an object of
the wrong class.

> 2. If they do justify avoiding the previous scenario,
> is there a technique favored for obtaining some
> polymorphism in this situation?

   If a position is changeable - it's an attribute of a person:

from sqlobject import *

class Person(SQLObject):
    firstName = StringCol()
    lastName = StringCol()
    position = StringCol() # "Employee", "Consultant"...

If you you insist on using different classes you should lift the ban on the
requirement to preserve IDs.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to