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.
The text was updated successfully, but these errors were encountered:
…pdatable entity views
…pdatable entity views
… support for updatable entity views
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
…entity views and a notion for creatable entity view
…ork a bit on usability with embeddables
…tion semantics for dirtyness
…detection of basic types
… immutable types. Added Plural factories as preparation for collection remappings and to allow sorted variation in edit views. Fixed Blazebit#476 by replacing objects in hash based collections after persists.