> class User(Entity):
> has_field('username', Unicode(30))
>
> class Role(Entity):
> has_field('name')
> # this won't work because it needs a foreign key from user to Role.
> has_many('users', of_kind='User', backref='role')
how about supporting this:
class Role(Entity):
has_field('name')
has_and_belongs_to_many('users', of_kind='Users', backref='roles')
it should be fine, since it doesnt alter the db structure for the
entity, just adds a relation-table
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---