posted 14 years ago
Hi,
In my sample program I tried to retrieve set of records from my database using the below statements. I am successful with retrieving data from database.
I added up a unique id generator in the entity constructor.
Whenever session.createQuery("from Personal p") is invoked it calls up the constructor and it generates a new unique ID. wherein it should not be generated.
I am not sure where I have to specify the newly generated unique identifier for the primary_key
Can any one specify how to minimize/solve the problem