Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Manage patch operations into OneToMany relations (JPA context) #14

Open
pdorgambide opened this issue Dec 17, 2014 · 0 comments
Open

Manage patch operations into OneToMany relations (JPA context) #14

pdorgambide opened this issue Dec 17, 2014 · 0 comments

Comments

@pdorgambide
Copy link

Hi:
We have a web app were use the sugested JpaPersistenceCallback, and have a model where exist a parent entity with many items (OneToMany JPA hibernate context). At client side we want work only with the parent reference (single shadow) change properties and adding and remove items:

{"op":"add","path":"/items/0","value":{"name":"Item name"}}

Tha patch array operations dont work and we suppose that don't make a right JSON conversion since try to evaluate the value (LateObjectEvaluator ) with the entityValueType of the parent.

return value instanceof LateObjectEvaluator ? ((LateObjectEvaluator) value).evaluate(entityValueType) : value;

Maybe our approach is not the best solution to sync into a JPA context with OneToMany relations even if exists Lazy Fetch (where collections are PersistedBags) and could be better use shadow parent and items separated.
I hope your comments and sugestions, Great Job.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant