On Feb 20, 12:01 pm, "Ali" <[EMAIL PROTECTED]> wrote:
>
> Here is my code (with other fields removed):
>
> stockreceipt_table = Table('stockreceipt', meta,
>     Column('user_id', Integer, ForeignKey('user.id')),
>     # Cancellation
>     Column('cancelled_user_id', Integer, ForeignKey('user.id')),
> )
>
> class Receipt(object):
>     """Stock Receipt"""
>
> assign_mapper(ctx, Receipt, stockreceipt_table,
>     properties=dict(
>         user=relation(User, backref='receipts',
>             primaryjoin=stockreceipt_table.c.user_id ==
> users_table.c.id),
>         cancelled_user=relation(User, backref='cancelled_receipts',
> lazy=False,
>             primaryjoin=stockreceipt_table.c.cancelled_user_id ==
> users_table.c.id),
>     )

that cant be right, since theres no primary key expressed either in
the stockreceipt_table or in your Receipt mapper.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to