Hi all,
i am newbie to hibernate and wanted to know how can we know the recenty saved objects' id without firing another query?
i am using hierbate 3.0.
I have a jsp form let say it is asking for name and address.
the user table of mysql have three fields called id,name and address.
userObject.setName() and userObject.setAddress() and
while accepting data from user and using session.save(userObject) ,
is there anyway to know the recently added objects id?
id is the primary key on the table and is auto-increment.
thanks in advance..
nirav
|