| Chunk |
|---|
| Conflicting content |
|---|
* The attachment to remove.
*/
protected void removeAttachment(Attachment attachment) {
<<<<<<< HEAD
// There is a problem with HashSet and JPA. Items are hashed based upon
// their id, but the id can change. Originally it is null until it is
// saved, and after that it's the unique id from the database. However
// if you try and remove the new object after it has been saved while
// still on the original instance of the parent object the remove will
// silently fail because the hashcode of the object has changed. To
// solve this problem we rehash the set just before moving. This is a
// database expensive operation.
attachments = new HashSet |
| Solution content |
|---|
* The attachment to remove.
*/
protected void removeAttachment(Attachment attachment) {
// There is a problem with HashSet and JPA. Items are hashed based upon
// their id, but the id can change. Originally it is null until it is
// saved, and after that it's the unique id from the database. However
// if you try and remove the new object after it has been saved while
// still on the original instance of the parent object the remove will
// silently fail because the hashcode of the object has changed. To
// solve this problem we rehash the set just before moving. This is a
// database expensive operation.
attachments = new HashSet |
| File |
|---|
| JpaSubmissionImpl.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Comment |
| Method invocation |