Re: sqlobject one-to-many join question
Oleg Broytman <[email protected]> Wed, 16 Dec 2015 12:37:18 +0100
| Newsgroups | gmane.comp.python.sqlobject |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Dec 16, 2015 at 10:10:13AM +0100, Oleg Broytman <[email protected]> wrote: > class Table_Groups(SQLObject): > name = StringCol(length=32) > sensors = MultipleJoin("Table_Sensors", joinColumn="id") This time it was my fault: sensors = MultipleJoin("Table_Sensors", joinColumn="group_id") > group = Table_Groups.select(Table_Groups.q.name=='Feels_Like')[0] > for sensor in group.sensors: > print sensor Oleg. -- Oleg Broytman http://phdru.name/ [email protected] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------