• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle emty string and null

 
avihai marchiano
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I use JPA (Jboss + hibernate) and the problem is that oracle save empty string ("") as null, but i need to distinguish between null to empty strings.

Can you advice , please.

Thank you
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's just Oracle for you; empty strings are treated as null values. You could work round this by defining a different value to equal an empty string and watch for it in your code?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic