I am using Hibernate 3.0 in my application. I have a list of records retrieved from the oracle db using hibernate and shown in my page. Now when i delete a record and try to add that same record again, it does not get added. But if i go to some other page and come back to this page and then try to add the same record, it allows me to add the record. I have been stuck on this for 3 days now. Please help me out.
what do you mean by "same record" ? do you assign the PK yourself and use the same PK as the deleted object ? if your not generating PKs by "assigned" then its hibernate controlling the PK and then you can not add the "same record" again.
i dont see how this could happen and therefore i just ask a lots of questions that come to mind. perhaps one of them is leading you in the right direction... what cache do you mean ? the hibernate cache ? which 1st (Session) or 2nd (do you have enabled it ?) or the cache from browser (form field values, page) or web server ? do you commit the TX after deleting ? where/how are the transaction s manged ? how do you insert/delete ? can we see some code ?