Hi,
I am new to using Hibernate(v3.2.0) and try to find a fix for this mapping problem:
-Assuming a class Person with *only* a SSN field in it, along with a Person table with columns ID and SSN. ID column is the primary key, and SSN column is also unique.
-Assuming the class and table can NOT be changed, is there a way to create a mapping that inexplicitly populate the ID column in the Person table in this operation:
Person p = new Person();
p.setSSN('123-45-9999');
session.save(p)
Also when the object is fetched, the ID column is automatically ignored.
Your help is greatly appreciated!
-Herbert
|