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

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

Description

@pdorgambide

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions