[SQLObject] sqlbuilder and many-to-many, I still don't get it
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Daniel H. <dan...@gm...> - 2006-01-04 13:12:13
|
Hi there! After searching ml-archives, google and some sourcecode, I'm still stuck. I have a simple many-to-many relationship and want to query using an sqlbuilder-expression without any handwritten SQL. Here's the model: class Movie(SQLObject): title =3D StringCol(length=3D50) actors =3D RelatedJoin("Actor") class Actor(SQLObject): name =3D StringCol(length=3D50) movies =3D RelatedJoin("Movie") Now, is there a more or less simple sqlbuilder expression to retrieve all m= ovies starring an actor which name.contains("Robert")? What would be the "officia= l" way to write such a query? Is there a place in the web that answers such questions beside the ml-archi= ve and the docs at sqlobject.org? Thanks in advance and sorry for asking, if this has already been answered. Daniel Haus |