Joined: Wed Jan 05, 2011 1:12 pm Posts: 3
|
Hi,
I want to generate a guid for a non primary key field. Is it possible? i am using reverse engineering from Hibernate tools. Inorder to do it do i need to modify my mapping file and entity classes.
My Entity class:
public String getGuid() { return this.guid; }
public void setGuid(String guid) { this.guid = guid; }
My mapping:
<property generated="never" lazy="false" name="guid" type="string"> <column length="36" name="Guid" not-null="true"/> </property>
Could I use a generator class here to generate it automatically even if it is not a primary key column?
|
|