For the second option "a map of employee-project does not make sense at all."
I think the major reason why it does not make sense because Project is an entity.
When an entity is a value of a map, we should use @ManyToMany instead of @ElementCollection.
This point can be added to the explanation if it is correct.
About Question enthuware.oce-jpad.v6.2.432 :
Moderator: admin
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.432 :
The forth option has this "@JoinTable annotation is used when there is no additional column in the join table. Here, we have startdate, enddate and hoursperweek as well in the same join table. I think this should be the explanation for the third option.
The forth option is wrong because @ElementCollection should be used with @CollectionTable, not @JoinTable.
The forth option is wrong because @ElementCollection should be used with @CollectionTable, not @JoinTable.
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-jpad.v6.2.432 :
Updated.
thank you for your feedback!
Paul.
thank you for your feedback!
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 31 guests