Hi all,
First post here so please feel free to redirect if appropriate.
I'm using Hibernate 4.3.0.Beta4 (as part of the WildFly distribution), and am seeing (what I think is) some weird behaviour with schema generation from @ManyToOne. Essentially, the generated schema includes a NOT NULL on the join column.
I have a class that contains the following relationship:
Code:
@ManyToOne
@JoinColumn(name="settlement_id")
private Settlement settlement;
I understand from the documentation that the 'optional' attribute of @ManyToOne defaults to true, which should allow NULLs. I have tried adding the 'nullable=true' attribute to the @JoinColumn, but the NOT NULL is generated with or without this attribute.
As an aside, I noticed https://hibernate.atlassian.net/browse/HHH-8229, which appears to be related. I am just wondering if there is some more general problem with the processing of the annotation(s).
I wanted to check whether this is a bug, or a misunderstanding on my part?
Many thanks
Paul