These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: not-null property references a null or transient value
PostPosted: Tue Feb 16, 2010 8:46 pm 
Newbie

Joined: Tue Feb 16, 2010 8:32 pm
Posts: 7
Hi,
ENV: Netbeans 6.8, Java Swing app
I have changed the JPA provider from EclipseLink 2 to Hibernate 3.2.5 and now the message below is displayed when the bid is persisted.
Code:
Exception in thread "AWT-EventQueue-0" javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.az.paystation.model.Bid.bidderNumber

Code:
        entityManager.persist(bid);

Here is the column
Code:
    @Column(name = "BIDDER_NUMBER", nullable = false, length = 30)
    private String bidderNumber;

Is it possible to turn off the checking until the transaction is committed?

Thanks


Top
 Profile  
 
 Post subject: Re: not-null property references a null or transient value
PostPosted: Wed Feb 17, 2010 4:00 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
I don't know if you can postpone the null-checking to flush/commit.
But you can disable null-checking at all by configuration
Code:
hibernate.check_nullability=false

an let the database do the check.
Background: usually nullable = false fields are mapped on database schema as not nullable
so the database does this check also.

N.B.: Can you please post the whole stacktrace of your org.hibernate.PropertyValueException


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.