We're updating the issue view to help you get more done. 

Stackoverflow on @Required

Description

Hello,

I have a stackoverflow error in the following test case.
This test case define a bidirectionnal relation OneToMany between A and B where at least one B is Required in the collection A.getB().
The goal of the test case is to delete some B retreived from database.

My conclusion: it does not work when retreiving B directly - see deleteFromB() - but it works when getting B from the retreived A - see deleteFromA().
In class MainAB.java, if I use deleteFromA() method, the deletion of "B"s works but deleteFromB() causes a stackoverflow.

I think it is a bug on Hibernate or Hibernate Validator but I am not sure, perhaps it is normal with this mapping ?
If someone can guide me.

Best regards,

Vincent

ORIGINAL POST : https://forum.hibernate.org/viewtopic.php?f=9&t=1012855

Environment

Tests done on Hibernate 3.6.5 final and Hibernate 3.6.7 final with MySQL 5.1

Status

Assignee

Unassigned

Reporter

Vincent LE HELLIDU

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Affects versions

4.1.0.Final
4.2.0.Final

Priority

Major