سؤال

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