Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with nullable mapping  RSS feed

 
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: 17309
11
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!