• 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: 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!