Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Updatable entity view prototype #414
We have an extensive feature list provided in #127 and we should prototype some of the features so we can test them in real applications. It is not a goal to implement all features in this release but get a minimal version that can be used and actually makes sense. We should focus on the features rather than the best implementation or various strategies to see if this model is actually usable in real applications or how it should be adapted.
During the discussion with some of my fellow colleagues, we thought through some questions that came to my mind.
At first, only allow managed instances, in a final version we might also allow custom subtypes for easier integration
Yes we want that(
Set the value on the respective objects. Note that this requires such views to have an id mapping just like updatable entity views, although it doesn't have to be updatable.
We decided on the defaults
Currently we have the partial strategy, which does dirty checking and skips updates of non-dirty attributes and the full strategy, which always updates everything.
The new strategy will do dirty checking like the partial strategy and will do a full update of the object, if at least one attribute is dirty. By doing the dirty checking, the strategy can implement entity graph loading or query flushing more efficiently.
Should ignore the configured default and do full updates all the way.
When mapping a collection in an entity view that has a inverse relation mapping, the "collection add/remove" operations can be implemented by updating the inverse relations respectively. This is a nice optimization that should be implemented at some point.
After discussing possible use cases like auditing or conditional checks, we decided that this is a very important feature. Maybe we could even annotate a lock level or so that should be used when a change is detected.
Other features we discussed