Originally posted by Jolie Lee:
everything is stored in the database. when i update i update the db. i know the date is there because after i do update i go check the db and the date is there. but when i update another record, and i check the db, my previous updated record, the date becomes NULL.
Jolie...we're not saying that the data isn't being stored in the database...I'm sure it is. The problem seems to be that when you go to save another object, you're overwriting your changes with an older copy of the object you had just saved. So your initial save is working fine, but you're just inadvertently saving the object again which is probably not what you want to do.
I think what you need to do is reload the list of objects after every save. It might not be the most optimized solution, but do this just to see if that's the real cause of your problem. This way when you reload the list, you'll get the latest and greatest from the database.
This is the kind of problem that optimistic locking is supposed to solve. Hibernate supports this by means of managed versioning...check that out as well. If you implement this, you should get an error when you try to save a stale copy of your object. So it'll force you to reload your objects once they've been committed to the database.