at http://www.objectdb.com/java/jpa/entity/types website in "Embeddable Classes" section there is a phrase "e.g. their instances cannot be shared by different entity objects" which seems to be wrong.
Issue #1310: probable error in text of manual about embeddable classes
Type: Bug Reoprt | Version: 1.4.0 | Priority: Normal | Status: Closed | Replies: 1 |
The complete paragraph:
"Instances of embeddable classes are always embedded in other entity objects and do not require separate space allocation and separate store and retrieval operations. Therefore, using embeddable classes can save space in the database and improve efficiency.
Embeddable classes, however, do not have an identity (primary key) of their own which leads to some limitations (e.g. their instances cannot be shared by different entity objects and they cannot be queried directly), so a decision whether to declare a class as an entity or embeddable requires case by case consideration."
If you try to share an embeddable object, i.e. include a reference to it from two different entity objects, eventually each entity object will gets its own copy of that embeddable object.
If you still think that this is wrong, please explain.