Have you tried this approach:
http://elixir.ematia.de/svn/elixir/trunk/tests/test_nestedclass.py
On 1 touko, 05:33, "Gregory W. Bond" <[EMAIL PROTECTED]> wrote:
>
> what i want to do is quite simple really: i want a parent superclass
> "User" with two child subclasses "Group" and "Individual" i.e. a
> "User" can be a "Group" or an "Individual" - furthermore i want a
> "Group" to consist of a set of "Individuals"
>
> here's how i specified this with Elixir:
>
> class User(Entity):
> has_field('id', String(255), primary_key=True)
> has_field('name', Unicode(255), default="")
> using_options(tablename='users')
>
> class Group(User):
> has_and_belongs_to_many('users', of_kind="Individual",
> inverse="groups")
>
> class Individual(User):
> has_and_belongs_to_many('groups', of_kind="Group", inverse="users")
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---