I would like to use a component id in an entity:
Code:
public class Entity {
public static class EntityId {
private String id;
...
}
private EntityId id;
...
}
The table's entity_id column is of type VARCHAR.
How do I map this? If the id were just of type String, it would look like:
Code:
<id name="id" type="string" column="entity_id">
<generator class="StringSequenceGenerator">
<param name="sequence">s_entity</param>
</generator>
</id>
From the documentation it looks like I may need to specify:
Code:
access="ClassName"
and then implement:
Code:
net.sf.hibernate.property.PropertyAccessor
Is this correct?
Thanks!