I’ve database where I’m joining tables O…1 that is one to optional one.
What tag should I use in persistence Entity class @OneToOne or @OneToMany relationship?
Thanks for your help.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
@OneToOneis what you’re looking for. Its optional attribute is used to tell if its a 1-0..1 or a 1-1. By default,optionalis true, so it means that it’s a 1-0..1.