Hi Andrea,

We saw your message to dev@ already, and there was a reply:

https://lists.apache.org/thread.html/Z8c9iuyg8obghec

I guess you haven't seen it as the reply was sent to the list, not to you 
directly. So now I am including your address in cc:. 

Now back to your question. Cayenne does operation ordering to satisfy the 
constraints. But the graph sort algorithm has a few known limitations. Namely 
it doesn't know how to order dependency cycles (e.g. Employee -> Department -> 
Manager, who is also an employee). Those have to be resoled manually. There are 
two solutions:

* Manual two-step commits - helps to resolve real cycles, when there's no valid 
ordering satisfying the constraints at all.
* @SortWeight annotation, which forces a certain predefined commit order 
between two or more entities. It helps to resolve cases with "virtual" cycles 
(where Cayenne thinks there's a cycle, but the actual commit still has a valid 
operation ordering that satisfies constraints).

Andrus

> On May 12, 2016, at 1:15 AM, Andrea Biasillo <[email protected]> wrote:
> 
> Hi!
> 
> My name is Andrea Biasillo, I am software architect in Dataloy AS, Bergen
> Norway. In one of our project we use Cayenne as ORM. Unfortunately we are
> facing the same problem reported by this case:
> 
> https://issues.apache.org/jira/browse/CAY-1898
> 
> Is  this case never  been taken in consideration? Is there a solution or at
> least a work-wround?
> 
> Many regards
> 
> -- 
> 
> Andrea Biasillo - Dataloy Systems
> 
> P: +47 55 36 03 00
> 
> M: +4746542580 <%2B47%2055%2036%2003%2000>
> 
> Dataloy Service Desk <http://support.dataloy.com/>
> 
> Dataloy Knowledge Base <http://kb.dataloy.com/>
> 
> Subscribe to the Dataloy Newsletter <http://dataloy-systems.com/?page_id=591>
> 
> twitter.com/dataloy
> 
> www.dataloy-systems.com

Reply via email to