PS. I wasn't intending to be confusing with the recursive relationship comment. I just wanted to illustrate that as far as Cayenne/Ashwood are concerned, there is a difference between A->B->A and A->A. The first is circular, the second is recursive. To quote the AshwoodEntitySorter documentation: "Presently it works for acyclic [what I called circular, or non-circular in this instance] database schemas with possible multi-reflexive [what I called recursive] tables."
On Thu, Dec 8, 2016 at 11:30 AM, Michael Gentry <mgen...@masslight.net> wrote: > Hi Peter, > > I don't think that's a circular graph, unless perhaps you have more > relationships that are omitted. You have: > > Person->Country > Person->Telephone->Country > > Neither of those circle back to Person. Note: It's fine to have > Person->Person. Cayenne supports recursive relationships. > > mrg > > > > On Thu, Dec 8, 2016 at 10:14 AM, fael <peter.hv...@jamesinnes.com> wrote: > >> Hi Michael, >> >> Thanks for your reply here! >> >> I did indeed come across the discussions on the Ashwood sorter and >> circular >> dependencies. When you speak of a circular object graph and taking your A >> -> >> B ... -> A example I just wanted to clarify and confirm that your example >> is >> essentially as follows; >> >> Imagine these are the tables; >> A[id (primary key), b_id] >> B[id (primary key), c_id] >> C[id (primary key), d_id] >> D[id (primary key), e_id] >> E[id (primary key), a_id] >> >> And these the foreign keys; >> A.b_id - B.id >> B.c_id - C.id >> C.d_id - D.id >> D.e_id - E.id >> E.a_id - A.id >> >> -------------- >> >> The sort of cycle I might have is as follows; >> >> Person[id (pk), country_id, telephone_id] >> Telephone[id (pk), country_id, number] >> Country[id (pk)] >> >> Person.country_id = Country.id >> Person.telephone_id = Telephone.id >> Telephone.country_id = Country.id >> >> Do you think this counts as the sort of cycle that might cause this sort >> of >> dice rolling effect? >> >> Thanks again! >> Peter >> >> >> >> >> >> -- >> View this message in context: http://cayenne.195.n3.nabble.c >> om/Erratic-AshwoodEntitySorter-NPE-on-Latest-Snapshot-tp4027 >> 453p4028309.html >> Sent from the Cayenne - User mailing list archive at Nabble.com. >> > >