Skip to content

Unidirectional OneToOne relationship is not working #25901

Closed Answered by mshima
aelfricraven asked this question in Q&A
Discussion options

You must be logged in to vote

Use ManyToOne instead of OneToOne.

OneToOne is bidirectional in JHipster because once the generator finds the OneToOne type on the left side, it creates the back reference.
Constraints will be created in the back reference to make it a OneToOne relationship, otherwise it’s effectively a ManyToOne relationship.

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
1 reply
@aelfricraven
Comment options

Comment options

You must be logged in to vote
9 replies
@OmarHawk
Comment options

@OmarHawk
Comment options

@mshima
Comment options

mshima May 9, 2024
Collaborator

@OmarHawk
Comment options

@DanielFran
Comment options

Answer selected by mshima
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants