PyDO2 inheritance ..

Steve Kieu <[email protected]> Fri, 3 Jun 2005 11:45:08 +1000 (EST)
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
Hi,

Reading the docs I understand that inheritance is
possible. My case is like this:

a table person(id,name,email)
a table staff(id, start_date)

staff.id is foreign key of person.id, and also primary
key.

mapping to object

class person(PyDO):
  table='person'
  fields=(Sequence('id'),'name','email')
class staff(person):
  table='staff'
  fields=(Sequence('id'),'start_date')

However if I call 

staff.new(id=1,start_date='2001-01-03',name='Test',email='email')

it does not work, and complain that name and email is
Unknown column email.

I think I did something wrong but not figure it out
what, please help.

Regards

S.KIEU

Send instant messages to your online friends http://au.messenger.yahoo.com 


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005