On Thursday 22 October 2009 20:44:26 Gaetan de Menten wrote: > On Thu, Oct 22, 2009 at 19:48, Diez B. Roggisch <[email protected]> wrote: > > a couple of month ago I asked how to create circular dependencies within > > Elixir. Eventually, I dropped the issue, as I just created a normal > > int-column and some @property-magic around it. > > > > Now it became apparent that this produces *horrible* SQL-query-numbers, > > as SA/Elixir isn't aware of the relationship. > > > > We found that by temporarily declaring the relationship the other way > > round, and it massively improved the performance. > > > > So I created a minimal example that shows the problems we run into - and > > it would be *fabulous* if one could advise us on how to solve that. > > You should use post_update=True on the ManyToOne relationship. See: > http://www.sqlalchemy.org/docs/05/mappers.html#rows-that-point-to-themselve >s-mutually-dependent-rows
We found that short after I posted this. I think putting this into the docs, or creating a best-practices-example for the tutorial would help tremendously. Regards, Diez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
