[Z3-sqlos] Examples with multiple tables
Andres Freund
andres at anarazel.de
Wed Feb 1 20:53:48 CET 2006
Hi,
On Wednesday 01 February 2006 20:27, Rob Campbell wrote:
> I'm just
> looking for a simple example of using multiple tables in sqlos and
> zope3. Thank you.
Where is your problem lying with joins? You just set up join via defining it
in your class like this (i just wrote it up, without checking, beware of
stupid errors):
from sqlobject.joins import ManyToMany, OneToMany
class xyz(SQLOS):
implements ....
abc = ManyToMany("someotherclass")
IntCol(....
xyz.abc is now an iterator over the elements of the related class.
Greetings,
Andres Freund
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://codespeak.net/pipermail/z3-sqlos/attachments/20060201/7309e210/attachment.pgp
More information about the z3-sqlos
mailing list