File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Null date merge problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Null date merge problem" Watch "Null date merge problem" New topic
Author

Null date merge problem

Neha Mahajan
Greenhorn

Joined: Apr 22, 2008
Posts: 7
While persisting(merge) an entity, I try to update a date column with a null value. This is not happening and the old value is only retained. I'm using EJB 3.0 with JPA. How do I update my date columns with null?
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
How (exactly) are you setting the date to null and merging the object? What JPA provider are you using?

Check the managed object after the merge and confirm that its date has been set to null. Also if the date was null to begin with, nothing may need to be updated. Can you update other attributes of the object? Do any errors occur?

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Null date merge problem