usualy explicit backreferences for has_a/belongs_to/has_many/.. are
fine
but in some case like plugins that add new entities it is usefull to
have them automated since one cant rely in the fact that those plugins
will be availiable in every case
usage/example:
auth.py
class User(Entity):
has_auto_backreferences()
has_field('username', Unicode(30))
plugins/auth/roles.py
class Role(Entity):
has_field('name')
has_and_bolongs_to_many('users', of_kind='User', inverse='roles')
# will automatically add the fitting relation to the User entity
having auto-backreferences would help with DRY and allow to write
modular application without having dependency problems cause of
disabled plugins
greets
Ronny Pfannschmidt
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---