isaac wrote:
> Here's a way to do it without any plain SA. In the tests, just delete
> the two .refresh() lines. This should be fairly simple to add to
> Elixir.
This seems very useful, we'd definitely accept a patch to support the
AssociationProxy in a simple and integrated way.
> What would be the appropriate syntax to add?
>
> Perhaps:
>
> has_many('twos', of_kind='ThingTwo', inverse='ones',
> proxy_class='Cat' proxy_through='two',
> proxy_name='cats', order_by=Cats.c.sorter)
>
> Or maybe less complex, but requiring a matching has_many('cats'...):
>
> has_association('twos', relation='cats', proxy_via='two')
>
> ... something like that?
The first one looks complicated to me, and I am not sure its very
approachable. I'd vote for the second syntax. Work up a patch if you
are feeling up to it, and include some unit tests and documentation
updates. I think this would be a great improvement to Elixir!
Still not sure about the syntax, but I think I'd have to play with it to
know for sure what makes the most sense.
--
Jonathan LaCour
http://cleverdevil.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---