i'm new to databases (which is why i was attracted to Elixir in the
first place) and i've managed to build an impressive database (at
least from my perspective) with the help of Elixir - now i've started
to get cocky and decided to do something that seems like it might be
possible, but i just can't get it to work - furthermore i can't find
any examples out in google-land of what i want to do

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")

needless to say, this results in an error message (this is running in
the context of pylons websetup.py):

sqlalchemy.exceptions.ArgumentError: Table 'None.myapp_models_group'
not defined

my guess is that the recursive association is messing things up but i
don't have a clue how to fix this, or even if this possible


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to