Re: [SQLObject] sqlobject one-to-many join question
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Oleg B. <ph...@ph...> - 2015-12-16 11:37:29
|
On Wed, Dec 16, 2015 at 10:10:13AM +0100, Oleg Broytman <ph...@ph...> 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/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|