v2.8.8_2
I have an entity that has 2 collection fields:
@OneToMany(fetch = FetchType.EAGER)
Collection position;
@OneToMany(fetch = FetchType.EAGER)
Collection rotation
;
Now if I persist them so the values are:
position has values 1.0f, 2.0, 3.0
rotation has values 4.0f, 5.0, 6.0
This works fine. But when I load it from the database and set the values:
position has values 7.0f, 7.0, 7.0
rotation has values 8.0f, 8.0, 8.0
Merge it
EntityManager em = getEM();
try {
em.getTransaction().begin();
em.merge(myEntity);
em.getTransaction().commit();
return true;
} finally {
if (em.getTransaction().isActive()) {
em.getTransaction().rollback();
}
em.close();
}
now I look at the data, I get the following. I looked at my getters setters and they are fine, since persist works. But when updating(merging existing record) somehow the rotation overrides the position.
I can only have 1 field that is a Collection<Float>.
position has values 8.0f, 8.0, 8.0
rotation has values 8.0f, 8.0, 8.0