DS-3086: Fixed bug that made the integration tests fail

This commit is contained in:
Tom Desair
2016-04-19 15:07:35 +02:00
committed by dylan
parent 1d144f480c
commit a98fee0b5e
2 changed files with 5 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ public abstract class DSpaceObject implements Serializable, ReloadableEntity<jav
@Transient @Transient
private StringBuffer eventDetails = null; private StringBuffer eventDetails = null;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "dSpaceObject", cascade = CascadeType.ALL) @OneToMany(fetch = FetchType.LAZY, mappedBy = "dSpaceObject", cascade = CascadeType.ALL, orphanRemoval = true)
@OrderBy("metadataField, place") @OrderBy("metadataField, place")
private List<MetadataValue> metadata = new ArrayList<>(); private List<MetadataValue> metadata = new ArrayList<>();

View File

@@ -371,8 +371,8 @@ public class Context
* The database connection is not closed and can be reused afterwards. * The database connection is not closed and can be reused afterwards.
* *
* <b>WARNING: After calling this method all previously fetched entities are "detached" (pending * <b>WARNING: After calling this method all previously fetched entities are "detached" (pending
* changes are not tracked anymore). You have to reload all entities you still want to work manually * changes are not tracked anymore). You have to reload all entities you still want to work with
* after this method call (see {@link Context#reloadEntity(ReloadableEntity)}).</b> * manually after this method call (see {@link Context#reloadEntity(ReloadableEntity)}).</b>
* *
* @throws SQLException When committing the transaction in the database fails. * @throws SQLException When committing the transaction in the database fails.
*/ */
@@ -635,8 +635,8 @@ public class Context
* (heap space) memory. You should use this method when processing a large number of records. * (heap space) memory. You should use this method when processing a large number of records.
* *
* <b>WARNING: After calling this method all previously fetched entities are "detached" (pending * <b>WARNING: After calling this method all previously fetched entities are "detached" (pending
* changes are not tracked anymore). You have to reload all entities you still want to work manually * changes are not tracked anymore). You have to reload all entities you still want to work with
* after this method call (see {@link Context#reloadEntity(ReloadableEntity)}).</b> * manually after this method call (see {@link Context#reloadEntity(ReloadableEntity)}).</b>
* *
* This method will take care of reloading the current user. * This method will take care of reloading the current user.
* *