Great feature! :P -Lon
On Tue, Apr 23, 2019 at 12:16 AM Nikita Timofeev <[email protected]> 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 >
