In the example of many-to-many association(manager-responsible), anther table will be generated when exportschema(say Manager-responsible), with two forgeign key to ids of them, and the two foreign combine as the key.
For below deletion: is it one SQL or two, if two, it seems that the not-null constraints will be violated?
manager.getResponsibles().remove(responsible)
responsible.getManagers().remove(manager)
It seems tricky for many-to-many association because the relationship table is not assocaited with a persistent class, is there other decent alternatives for this mappying.
Thanks
|