I want to have Hibernate looking for empty string "" for unsaved object, what should unsaved-value attribute be set to? Should it be unsaved-value=""?
And for long typed id, is it better to set <id name="id" type="long" unsaved-value="-1">?
I use to have unsaved-value="null" for String id = null. But because we do id comparison in our code a lot, resulting in more code to handle NullPointerException for unsaved object, we decided it's easier to initialize the id string to empty string. Any thoughts would be appreciated. Thanks. Using Hibernate 3
|