• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with nullable mapping

 
Sverre Moe
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a table attribute has nullable = true does this correspond to Hibernate mapping not-null="true"?

I keep getting the error: not-null property references a null or transient value

The entity object has the property as null and that should be OK for the database as the corresponding table attribute can be null
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using false instead.

not-null=true means to not allow nulls.

Mark
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic