Re: [SQLObject] Method to validate data
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2010-03-12 21:56:53
|
Hi. It's too hard to read a message with a lot of boring and unnecessary details and too much of empty lines. Next time you want to ask a question please simplify it a bit. On Fri, Mar 12, 2010 at 02:37:27PM -0600, ji...@ql... wrote: > class Requisition(SQLObject): > requisitionPeriod = ForeignKey('RequisitionPeriod', > dbName='requisitionPeriodId') > > def _set_dateRequested(self, value): > dateRequested = value > > log.debug('here') > > requisitionPeriodId = self._SO_get_requisitionPeriod() You do want self.requisitionPeriod.id, don't you? requisitionPeriodId = self.requisitionPeriod.id > log.debug(requisitionPeriodId) > > When I try to add a Requistion, in my debug output I get to the first debug statement, but never to the second. I'm assuming it is because I'm specifying something wrong on - requisitionPeriodId = self._SO_get_requisitionPeriod() - but I don't know what I'm doing wrong. How do I specify this with a ForeignKey field? Oleg. -- Oleg Broytman http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |