blaze-persistence icon indicating copy to clipboard operation
blaze-persistence copied to clipboard

Relax "no fetches allowed" restriction when querying updatable entity views

Open david-kubecka opened this issue 2 years ago • 0 comments

Applying an EntityViewSetting with non-empty fetches to a CriteriaBuilder instance leads to this error:

Specifying fetches for @UpdatableEntityViews is currently disallowed. Remove the fetches!

The reason behind this is probably that the dirty tracking mechanism cannot work with partially populated entity views.

The use case here, though, is not to mutate the entity (view) but simply fetch it using an available view definition (which happens to be updatable).

The suggested behavior is to flag partially populated EVs and to throw an error only if such flagged EVs are to be saved/updated.

david-kubecka avatar Dec 19 '22 20:12 david-kubecka