Re: [hibernate-dev] https://hibernate.atlassian.net/browse/HHH-9798 Unique constraint / not null of @JoinTable for @OneToOne not generated

"Jason Pyeron" <[email protected]>
Newsgroups gmane.comp.java.hibernate.devel
Message-ID <[email protected]>

> -----Original Message-----
> From: Jason Pyeron
> Sent: Sunday, April 19, 2020 11:20 AM
> 
> I think I have found another corner case on the
> https://hibernate.atlassian.net/browse/HHH-9798 regression.
> 
> 
> 
<snip/>
> 
> 
> @OneToOne(fetch = FetchType.LAZY)
> 
>     @JoinTable(
> 
>         name = "ITEM_SHIPMENT", // Required!
> 
>         inverseJoinColumns =
> 
>             @JoinColumn(nullable = false,

Adding the nullable =false is correctly generating the join table with a not null, but is implying a optional=false on the OneToOne...

javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property references a null or transient value : XXXX.auction

> 
>                         unique = true)
> 
>     )
> 
>     protected Item auction;
> 
> 
> 
> Thoughts?
> 
> -Jason
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.