On Thu, 19 Jan 2006, Pau Aliagas wrote:
Sorry for folowing up myself, there are some mistakes, the question still
remains.
I should have used the dotq syntax in select!
I have two tables:
class handset_brand(SQLObject):
brand = StringCol(alternateID = True, length = 50)
handsets = SQLMultipleJoin('handset')
class handset(SQLObject):
handset_brand = ForeignKey('handset_brand')
model = StringCol(alternateID = True, length = 25)
I want to query the handsets of one brand. This should be obvious, right?
Well, at least for me it isn't, it does not work as expected.
But the question is:
-how can I do it in selectBy, it does not seem possible.
I'd expect to do:
print handset.selectBy(handset_brand==4)
or at least:
print handset.selectBy(handset_brandID==4)
but both fail with NameError.
What am I doing wrong? What is the recommended way?
--
Pau
-------------------------------------------------------
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