Results 1 to 2 of 2
- 03-29-2012, 08:23 PM #1
Member
- Join Date
- Sep 2010
- Posts
- 40
- Rep Power
- 0
hibernate creates white spaces on db when saving emtpy strings
Guys,
I am new to hibernate and still learning. In our application, I noticed that every time I save an empty string into a field using hibernate, it creates a white space in the db column.The hibernate method used is saveOrUpdate().It passes an user object as argument which has a fax number field which is empty string(""). But when saved, the db fax number column has a white space. I am using sybase db and the fax is type varchar.If I pass in null instead of empty string, it works fine. Not sure where the white space coming from for empty strings. I did find some articles regarding db padding, but here the type is varchar and it shouldn't do any padding, right? So how fix this?
Any advice would be greatly appreciated.
Thanks!
- 03-29-2012, 09:11 PM #2
Member
- Join Date
- Sep 2010
- Posts
- 40
- Rep Power
- 0
Similar Threads
-
Creates multiple log files
By bikashlama in forum New To JavaReplies: 3Last Post: 12-27-2011, 06:09 AM -
How to share the text Area in White Board?My White Board is in BigBlueButton
By nirasiva in forum New To JavaReplies: 2Last Post: 06-29-2011, 09:08 AM -
When the compiler creates the variable?
By hitesh_public in forum New To JavaReplies: 14Last Post: 08-17-2010, 10:21 AM -
How to display a String that contains more than one white spaces
By thachun in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 09-27-2009, 09:16 AM -
Saving Blob through Hibernate
By Ed in forum JDBCReplies: 2Last Post: 01-05-2009, 05:03 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks