Question

Is there any code or API should call to make current entity's @Embeddable field to be managed? Or is it supposed to be default managed by its parent?

Était-ce utile?

La solution

The Embeddable objects are not directly manageable, as they do not have a persistent identity by themselves. As you guessed, the entity containing the embeddable is manageable, meaning that the EntityManager tracks the changes of the Emebeddable instance through the Entity instance.

This means, making the parent entity managed, you will make also the Embeddable instance managed.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top