Is there a less ugly way to declare uniqueness constraints for the
following example?
6 class Bar(Entity):
7 has_field('id', Integer(), primary_key=True)
8
9 class Foo(Entity):
10 belongs_to('bar', of_kind='Bar')
11 has_field('id', Integer(), primary_key=True)
12 Foo._descriptor.add_constraint(UniqueConstraint('bar_id', 'id'))
I read through my copy of the elixir source and I didn't see anywhere
that the EntityMeta would pick up constraint declarations.
vic
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---