cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: DataDomainFlushAction redesign
Date Wed, 24 Apr 2019 05:51:50 GMT
>>> There are many new ideas I have where we can move from here.

Yeah, while the entire feature is pretty awesome by itself, I am looking forward for this
to open the door for other improvements. A few things I can think of:

* Out-of-the-box resolution of commit ordering edge cases. Such as circular dependency resolving
(manager of a department who is also an employee) that requires an INSERT with NULL FK followed
by an UPDATE.
* Mapping commits to stored procedures (I know, yikes!)
* etc.

Andrus


> On Apr 23, 2019, at 11:45 PM, Hugi Thordarson <hugi@karlmenn.is> wrote:
> 
> I'd just like to add that this is pretty awesome.
> 
> 
>> On 23 Apr 2019, at 20:29, Lon Varscsak <lon.varscsak@gmail.com> wrote:
>> 
>> Great feature!  :P
>> 
>> -Lon
>> 
>> On Tue, Apr 23, 2019 at 12:16 AM Nikita Timofeev <ntimofeev@objectstyle.com>
>> wrote:
>> 
>>> Hi all,
>>> 
>>> For a long time I've worked on this task [1] and now I'm ready to
>>> merge it [2]. As it's a pretty big change in a core part of Cayenne, I
>>> wanted to notify about is as much as I can.
>>> 
>>> In short this is about mechanics that flushes changes from context to DB.
>>> Currently it's a monolith and private so no extension is effectively
>>> possible and it's hard to fix issues in it.
>>> 
>>> The idea in a new version is to use intermediate representation of DB
>>> operations [3] and work with it, rather than generate queries directly
>>> from object changes. This potentially allows to modify this new
>>> pipeline endlessly. I.e. to modify sorting of operation without
>>> changing anything else, to customize query generation or even use
>>> custom queries. It even allows to use your own implementation of this
>>> operations.
>>> 
>>> There are many new ideas I have where we can move from here. It
>>> already fixes issue with flattened attributes update. But right now
>>> this change should not break things. I really hope it won't break a
>>> lot, but there are so many options and Cayenne test suite is not
>>> perfect. So early adopters are welcome :)
>>> 
>>> Just in case I left the old implementation so you can just connect it via
>>> DI.
>>> 
>>> [1] https://issues.apache.org/jira/browse/CAY-2571
>>> [2] https://github.com/apache/cayenne/pull/377
>>> [3]
>>> https://github.com/apache/cayenne/blob/f55efff11227671dc89ab2d5561858e9e2e75100/cayenne-server/src/main/java/org/apache/cayenne/access/flush/operation/DbRowOp.java#L32
>>> --
>>> Best regards,
>>> Nikita Timofeev
>>> 
> 


Mime
View raw message