实体(Entity)与值对象(Value)在持久化上的区别 仅自己可见
摘自Hibernate 0.93文档
entities and values
An entity exists independently of any other objects holding references to the entity. Contrast this with the usual Java model where an unreferenced object is garbage collected. Currently, the only entities are instances of classes which implement Persistent. Entities must be explicitly created and deleted. This is different from the JDO and ODMG model of object persistence by reachablity - and corresponds more closely to how application objects are usually used in large systems. (A future version of Hibernate will probably add persistence by reachablity as an option.) Entities support circular and shared references. They may also be versioned.
一个实体独立存在于引用它的对象。和Java模型中不同,一个没有被引用的对象会被垃圾回收。... 实体必须没显式的创建和删除。...实体可以支持循环引用和共享引用。它们也有版本(version)。
An entity's persistent state consists of references to other entities and instances of value types. Values are primitives, collections, components and certain immutable objects. Unlike entities, values (in particular collections) are persisted by reachability. Since value objects (and primitives) are persisted and deleted along with their containing entity, they may not be independently versioned. Values have no independent identity, so they cannot be shared by two entities or collections.
一个实体的持久化状态包含对其他实体的引用和值类型实例。值是privimitive,集合,组件和不可变对象。和实体不同,值根据是否可及(reachability)被持久化。由于值对象和包含它的实体一起持久化和删除,所以它不可以有版本。值没有独立的身份(identity), 所以他们不能被实体或集合共有。