Jorge: That worked. I've been trying lots of different combinations but
never thought to try it with both the I & D capitalized. I specified the
dbName parameter in the model. Does that dbName refer to the joined table?
-Jim
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jorge Godoy
Sent: Friday, January 12, 2007 8:45 PM
To: [email protected]
Subject: [TurboGears] Re: Dynamic SQL Help
"Jim Steil" <[EMAIL PROTECTED]> writes:
> f = Formula.select()
> f = f.filter(Formula.q.name.startswith(searchText.encode('utf8')))
> f = f.filter(Formula.q.formulatedBy==18)
>
> And I get the following on the last statement.
>
> AttributeError: Formula instance has no attribute 'formulatedBy'
>
> Can someone tell me what is causing this error and how I can reference
this
> field in my filter?
>
> Again, I appreciate any info you can give me.
Try:
f = f.filter(Formula.q.formulatedByID==18)
The Formula.q.formulatedBy is an instance of the other class and not the
integer with the corresponding id.
--
Jorge Godoy <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---