Feature request: allow nullable with @ManyToOne #8611
Answered
by
beberlei
andig
asked this question in
Support Questions
-
I have a simple many-to-one entity:
which creates:
Adding
As entity is a foreign key it would be nice, if it could be made not nullable. |
Beta Was this translation helpful? Give feedback.
Answered by
beberlei
Apr 4, 2021
Replies: 2 comments
-
This is a feature of the join column, you just need to add |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
beberlei
-
Ahh, that was quick! Thank you very much and Happy Easter! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a feature of the join column, you just need to add
@JoinColumn(name="entity_id", nullable=false)
.