Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Null date merge problem

 
Neha Mahajan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic