Hi,
We have a simple class that by itself contains (among others) a property pointing to a collection:
class Bla { @OneToMany(cascade = CascadeType.ALL) private List<AttributeEntity> metaAttributes = new ArrayList<AttributeEntity>(); }
Now we do a simple em.persist(BlaInstance) and afterwards modify the metaAttributes property within a transaction, however this is not reflected in the db. Reason is simply that the metaAttributes property is still a regular ArrayList instance and no special proxy class from objectdb which can track changes. However, when we do simple re-select the object instance after inserting it into the database everything is perfect -- in debugger we can see that the metaAttributes points to a proxy class now.
Anyway, long text short question --> are we really supposed to *always* re-select *every* object after doing a persist() to get proper behavior? shouldn't an object instance persisted the first time with persist() behave *exactly* as if we'd have re-selected it from the database? In each other case, the automatic change tracking is driven to be being pretty useless..
thanks,
Alex