> In that case the keyword has no meaning anymore. I rather suggest you > create your own relationship type (inheriting from > HasAndBelongsToMany) with whatever keyword suits you. I just commited > a little change (r136) which should make this easier. > > With this change, something along the lines of: > > class HasAndBelongsToOne(HasAndBelongsToMany): > uselist = False > > has_and_belongs_to_one = Statement(HasAndBelongsToOne) > > shoud work. I'm not sure I want to include this in the main > distribution though. If you come up with a better name than > "HasAndBelongsToOne", I'll probably do though ;-).
This is a good point. Hmmm. What about changing "has_and_belongs_to_many" to "has_and_belongs_to," with my patch? This way it's: 1) More flexible 2) Consistent with the documentation 3) Consistent with other Elixir/SQLAlchemy usage involving the uselist keyword argument 4) More appropriately named As things stand at the moment, though, Elixir doesn't have a means of describing a bidirectional 1-to-1 association, and this doesn't seem to me to rise to the level of suggesting a fork--at all. At the moment, however, that's what we have, and what you seem to be suggesting. Thoughts? > -- > Gaƫtan de Mentenhttp://openhex.org Best regards, Paul Snively --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
