I have a two models, the second is mapping to the same first model twice, with specific values (it has the role of a ManyToMany table with added values) :
public class ModelB extend Model {
public ModelA parent;
public ModelA child;
public String value;
public boolean verified = true;
}
In ModelA :
@OneToMany(mappedBy="child")
List<ModelB> items;
If no entries are in the database for ModelB and I do a modelA.items.size()
=> 1!
Why 1 ? It should be 0.
This results in an error regarding the boolean and some other unexplained.
How can I fix it?