I got this error message:
error: Found shared references to a collection: Person.relatedPersons
When I tried to execute ad
Consider an entity:
public class Foo{
private user;
/* with getters and setters */
}
And consider an Business Logic class:
class Foo1{
List user = new ArrayList<>();
user = foo.getUser();
}
Here the user and foo.getUser() share the same reference. But saving the two references creates a conflict.
The proper usage should be:
class Foo1 {
List user = new ArrayList<>();
user.addAll(foo.getUser);
}
This avoids the conflict.