Re: [SQLObject] MultipleJoin inactive in version 0.6
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Andrew B. <and...@pu...> - 2004-11-02 21:20:19
|
On Tue, Nov 02, 2004 at 08:13:37PM +0000, Nigel King wrote: > Carlos, > I understand the point about joinColumn=... However, you describe how > this did work in version 0.5.2 but unfortunately not in version 0.6. > to be absolutely clear > =====temp.py==== > from sqlobject import * > > conn = 'mysql://nigelk@localhost/music' > > class Artist(SQLObject): > _connection = conn > Name = StringCol() > titles = MultipleJoin('TapeTitle',joinColumn='artist_id') What about if you change this last line to be: titles = MultipleJoin('TapeTitle',joinColumn='artist_id',joinMethodName='titles') ? [...] > This seems to me to be incorrect. > The only way that I can print the list that you highlight below is > > a.tapeTitles > > I do not understand where this name was came from, it seems like a > corruption of TapeTitle. It was available from the dictionary so I > tried it. If this is the joinMethodName bug, then it is fixed in SVN. There is a seperate problem that's been referred to in this thread which is that many people find the existing docs confusing because the examples don't use joinColumn, and rely instead on the SQL having just the right names in it already so that SQLObject automatically guesses them. Judging from the fact you had code working in 0.5.2, I don't think this is relevant to your problem. -Andrew. |