On Wed, Nov 07, 2007 at 11:59:56PM +0100, Nicolas Riedel wrote:
> class Worktime(SQLObject):
> user = ForeignKey("User")
>
> This call results in an Error:
> wt = Worktime.select(Worktime.q.user==identity.current.user)
> " AttributeError: Worktime instance has no attribute 'user' "
ForeignKeys aren't participating in the q-magic. But you can use their
IDs:
wt = Worktime.select(Worktime.q.userID==identity.current.user.id)
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.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss