Re: [SQLObject] Many To Many with a existing middle table

2008-07-31 Thread Jerome Kerdreux
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 = 'phot

Re: [SQLObject] Many To Many with a existing middle table

2008-07-31 Thread Neil Muller
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 = IntC

Re: [SQLObject] Many To Many with a existing middle table

2008-07-31 Thread Jerome Kerdreux
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 = ForeignKe

Re: [SQLObject] Many To Many with a existing middle table

2008-07-31 Thread Simon Cross
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_ta

Re: [SQLObject] Many To Many with a existing middle table

2008-07-31 Thread Jerome Kerdreux
Oups ... > class Photo(SQLObject): > tags = RelatedJoin('Tag') > tags = SQLRelatedJoin('Tag',intermediateTable='photo_tags') Only the second declaration is the right one of course .. but the issue is still there. -- --