Hi Sir,
In Hibernate Annotations 3.3.0 GA Reference Guide (page 20), there's the following:
"Troop has a bidirectional one to many relationship with Soldier through the troop property. You don't have to
(must not) define any physical mapping in the mappedBy side.
To map a bidirectional one to many, with the one-to-many side as the owning side, you have to remove the
mappedBy element and set the many to one @JoinColumn as insertable and updatable to false. This solution is
obviously not optimized and will produce some additional UPDATE statements."
Can anyone comment if the mentioned solution is not optimized, what will be the optimize solution?
Please advise.
_________________ Thank you.
Regards,
Jap.
|