you'd want to stick that FKconstraint in __table_args__:
class C(Base):
# ...
__table_args__ = (ForeignKeyConstraint(...), )
that way it gets appended to the Table object's list of constraints.
On Feb 16, 2012, at 6:19 PM, Alejandro Mery wrote:
> Hello, I need to make an association class where on of the sides has a
> composite primary key, while this actually work using __table_args__
> it doesn't when used "declaratively" as UniqueConstraint does. Is this
> expected or I'm doing something wrong?
>
> test case: http://paste.pocoo.org/show/552294/
> debug output: http://paste.pocoo.org/show/552269/
>
> sqlalchemy 0.6.8-1
> ubuntu 11.04/x86_64
>
> Thanks,
> Alejandro Mery
>
> --
> 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.
>
--
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.