On Thu, 31 Jul 2008 15:16:05 +0200
"Simon Cross" <[EMAIL PROTECTED]> wrote:

> On Thu, Jul 31, 2008 at 2:10 PM, Jerome Kerdreux <[EMAIL PROTECTED]> wrote:
> > class PhotosTags(SQLObject):
> >    class sqlmeta:
> >        table = 'photo_tags'
> >    photo = ForeignKey('Photo')
> >    tag = ForeignKey('Tag')
> 
> > Ok, but the right column in the intermediate table is this :
> > TABLE photo_tags ( photo_id      INTEGER, tag_id        INTEGER  );
> >
> > As you can see the columns are photo_id and tag_id .. but SQLO is looking 
> > for photos_id and tags_id (look the s at the end)..
> 
> Have you tried:
> 
>   photo = ForeignKey('Photo', dbName='photo_id')
>   tag = ForeignKey('Tag', dbName='tag_id')
> 
> [See top of 
> http://www.sqlobject.org/SQLObject.html#col-class-specifying-columns
> in the docs]


Yes, It's say ForeignKey doesn't accept dbName arg. So ... I'm block here. 
Anyaway, in this way, SQLO doesn't seems to use the ForeignKey anyway. 

-- 


-------------------------------------------------------------------------
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
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to