Joined: Thu Nov 16, 2006 11:52 am Posts: 8 Location: Frankfurt a.M., Germany
|
Hello,
I have a problem with removing an object from a 1:n relation from a PersistentSet. Removing the object works fine when done through the running application. However, the object is not removed when exactly the same code is executed initiated through a JUnit test case with exactly the same data.
I'm sure it is not the usual problem of the hashCode method not being written propperly. I iterate over the PersistentSet and write the hash code of every object in the set to the console and I see that the hashCode of the object to be removed is included in the set. Once more, it only happens when initiated through a JUnit test case. It does not happen when the code is run through the running application. In both cases exactly the same CSV file is parsed and imported.
I'm using hibernate 3.2.6 with annotations and Spring with annotations. The JUnit4 test case use annotations as well (@Transactional combined with defaultRollback = false). The called method that imports the CSV file is annotated with @Transactional(propagation = Propagations.REQUIRED).
Maybe someone has an idea where to start looking for the problem. Have tried some things but have remained basically without a clue.
Thanks and regards,
Oliver
|
|