On Thu, 31 Jul 2008 17:07:04 +0200
"Neil Muller" <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 31, 2008 at 2:10 PM, Jerome Kerdreux <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi, all.
> >
> >
> > And here is the result code.
> >
> >
> > class Photo(SQLObject):
> > class sqlmeta:
> > table = 'photos'
> > time = IntCol()
> > uri = UnicodeCol()
> > description = UnicodeCol()
> > roll_id = IntCol()
> > default_version_id = IntCol()
> > rating = IntCol()
> > tags = SQLRelatedJoin('Tag',intermediateTable='photo_tags')
>
> You can tell sqlobject which columns to use in the join using the
> joinColumn and otherColumn keywords - this is mentioned in the FAQ,
> although split across the descriptions of MultipleJoin and
> RelatedJoin. So, something like:
>
> tags =
> SQLRelatedJoin('Tag',intermediateTable='photo_tags',otherColumn='tag_id',
> joinColumn='photo_id')
>
> and
>
> photos =
> SQLRelatedJoin('Photo',intermediateTable='photo_tags',otherColumn='photo_id',
> joinColumn='tag_id')
>
Yes, you get it Neil. That's work fine ;)
Many thanks
--
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss