On Thu, Apr 3, 2008 at 3:40 PM, Jason R. Coombs <[EMAIL PROTECTED]> wrote: > > Thanks for integrating the fix. I understand your justifications for > leaving out the other tests. They were more for explanation or > clarification. The reason I had the test_many_to_two is because my > original problem contained two foreign keys into the same table, and I > needed to eliminate that as a cause. I thought leaving the test case > in since it did exemplify a particular pattern and wasn't covered > already in the tests...
I'd have left it in there if this was the case. But as far as I could see, it was covered by the "test_multi" test. > and even though it didn't draw out any issues > with the current code, could perhaps catch something in the future. I agree 100% with the reasoning... > That's your call, of course. > > Thanks for forwarding the issue on to the SQLAlchemy project. That > was my intention after I got some feedback here, so that saved me a > stop. > > Michael responded, and based on his response, I created <a > href="http://www.sqlalchemy.org/trac/wiki/UsageRecipes/ > PropertyWithSameNameAsColumn">the SQLAlchemy recipe here</a> (http:// > www.sqlalchemy.org/trac/wiki/UsageRecipes/PropertyWithSameNameAsColumn). > > I'd like to create an equivalent recipe in the Elixir docs, but I'm > not quite sure yet what to do. Is there an existing mechanism for > providing the child_fkey parameter to the properties when creating the > mapper? > > Perhaps this pattern should be hard-coded into Elixir if the column > name matches the attribute name. That is, if a class declares: > column_name = ManyToOne(..., colname='column_name', ...) > Elixir will detect the conflict and implement the child_fkey pattern > as in the recipe above. This is an option, but I'd prefer if this was implemented on SA's side. It's the same problem and forcing the user to define a child_fkey it doesn't care about is not optimal IMO. > Let me know your thoughts, and I'll be happy to provide a patch or > recipe based on your direction. Depending on Mike's answer to my own answer, a recipe using your workaround (which is approximately the same thing as what Mickael suggested) would be nice. -- Gaƫtan de Menten http://openhex.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 -~----------~----~----~----~------~----~------~--~---
