cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aristedes Maniatis <...@maniatis.org>
Subject Re: Order of operations?
Date Wed, 22 Jun 2016 22:58:52 GMT
On 23/06/2016 5:25am, Lon Varscsak wrote:
> Okay, I’ve found where it’s at (DataDomainFlushAction.preprocess).  I don’t
> see an easy way to override this, without just forking (which is totally
> doable).  Does anyone know why the default order of operations is INSERT ->
> UPDATE -> DELETE?  Because if there’s no specific reason, it seems like we
> could change this to support DBs that don’t have deferred constraints.  (or
> provide a hook to reorder these)


That's a pretty old piece of code, probably before my time. The history is unfortunately broken
by a move back in 2013 [1] but it would be interesting to go back to the origins of that file
and see if any commit message sheds light on why that ordering was chosen. It does seem an
odd choice, but perhaps there was a reason.

Before you fork Cayenne let's see if we can improve this behaviour for the entire community.


[1] https://github.com/apache/cayenne/commits/b0631deb251f036840d1ca3aee6d4ae50f2441bf/cayenne-server/src/main/java/org/apache/cayenne/access/DataDomainFlushAction.java

-- 
-------------------------->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

Mime
View raw message