On 22 Feb 2006 at 23:39, Ian Bicking wrote:

> Compound keys are not yet (fully) implemented, but are a core part of
> the design.

I need compound keys so have held off adopting sqlobject.

> Is now better done this way::
>      class Foo(SQLObject):
>          other_id = IntCol()
>          other = Reference('Other', 'other_id')

In the case of compound keys, it'd be better to explicitly indicate the mapping between columns.

How about using keywords in Reference to explicitely state the columns in the other table to be used in the join:

      class Foo(SQLObject):
          other_id1 = IntCol()
          other_name = StringCol()
          other = Reference('Other', id='other_id', name='other_name')

I have use cases where, say for individual record manipulation I have to use the compound primary key. But in other cases I only need to join based on one of the columns in the primary key. I'd like to be able to specify "other" both ways...

Brad Clements,                bkc@murkworks.com    (315)268-1000
AOL-IM or SKYPE: BKClements