I have two entities: A and B. From the A's side relationship is many to one where many A refer to one B and from the B's side this is one to many, where one B could have many A. Both mappings have cascade ="all".
If I try to delete A, since cascade is enabled on many to one, hibernate will try to delete B, but since one to many on B has also cascade enabled it will go back to A and so forth.. My question is: will it end up in infinite loop or hibernate has a way of detecting those situations and terminating execution?