@JoinTable or @JoinColumn

0

Good afternoon, folks. I have a diagram as below and I have a question. It is between User and Account and what I am in doubt is, if I access through CONTA, I find the USER, but I can not conversely. My question is, is it okay to do this? How do I not know my account? Only the account knows who I am ... I could do a @JoinTable and make a third table where the two sides would have access. Help me the best way. Many thanks!

    
asked by anonymous 14.04.2017 / 19:52

1 answer

1

The user can have n accounts. If you want the account to have access to the user and vice versa, you can use a two-way association.

    
14.04.2017 / 20:16