About Question enthuware.oce-jpad.v6.2.441 :
Posted: Sun Mar 15, 2015 11:07 am
Hello,
Explanation why first answer is wrong is not correct.
First answer is wrong because the targetEntity attribute on items field should point to Items.class not Category.class.
Explanation why first answer is wrong is not correct.
mappedBy is required only if you wish to have bi-directional mapping. However it is possible to have 2 uni-directional @ManyToMany mappings resulting in two join tables.One side of the ManyToMany must be made the owner of the relationship by specifying a mappedBy argument.
First answer is wrong because the targetEntity attribute on items field should point to Items.class not Category.class.