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)

-Lon

On Wed, Jun 22, 2016 at 11:55 AM, Lon Varscsak <[email protected]>
wrote:

> Do you know where in code Cayenne does this operation?
>
> On Tue, Jun 21, 2016 at 6:58 PM, Aristedes Maniatis <[email protected]>
> wrote:
>
>> On 22/06/2016 11:47am, Lon Varscsak wrote:
>> > I’m using Sybase where it doesn’t have deferred constraints and it seems
>> > like Cayenne is doing INSERTS first, but in my case, I want to do
>> DELETES
>> > -> UPDATES -> INSERTS.  Where can I control this?
>>
>> I don't know of any approach to solve this, however we deal with it by
>> committing the context first with the deletes and then after that for the
>> updates/inserts. So two separate context commits. And you can wrap a
>> database transaction around all that if you choose.
>>
>>
>> Ari
>>
>>
>>
>>
>> --
>> -------------------------->
>> Aristedes Maniatis
>> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>>
>
>

Reply via email to