Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top