Re: [SQLObject] [newbie] problem with MultipleJoin
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2004-09-20 01:25:25
|
paul kölle wrote: > paul kölle wrote: > > just for the record: > >> class CaCert(CertItem): >> SignedCaCerts = MultipleJoin('SubCaCert') >> ... >> >> class SubCaCert(CertItem): >> Ca = ForeignKey('CaCert') >> ... > > That's apparently wrong. In order to work such the name of the column > *has* to be the same as the referenced object (case insensitive?). While > the documentation gives a perfectly valid example ( person = > ForeignKey('Person')) it was not clear to me that those strings have to > be equal. The documentation notes the correspondence of the 'Person' > string with another class in the db nothing more. Maybe it's just me > knowing almost nothing about db/sql/whatever ... ;) You did encounter a bug. There's already a bug reported that is, I think, related to this -- basically an issue with the automatic naming with MultipleJoins. When I started using attributes instead of giving the names in the MultipleJoin constructor, I didn't convert everything over properly. -- Ian Bicking / ia...@co... / http://blog.ianbicking.org |