- create Tree entity with one composite Leaf entity
- save Tree entity
- try to open Tree Editor screen
#### Expected behavior
- Tree Editor screen will be open
#### Actual behavior
- `IllegalStateException: Changed instance com.company.listandcache.entity.Tree-cac725da-31da-9edc-fdd1-d9a560393623 [managed,detached] in read-only transaction`
This exception occurs in `com.haulmont.cuba.core.sys.persistence.PersistenceImplSupport$ContainerResourceSynchronization.beforeCommit(PersistenceImplSupport.java:423) ~[cuba-core-7.2.10.jar:7.2.10]` occurs due to changes in the `leafs` attribute of the Tree entity, but there were no explicit changes to this attribute after saving to the database
Environment
Description of the bug
Minimal reproducible example:
Create empty project wirh two entities: Tree and Leaf
@Table(name = "LISTANDCACHE_LEAF") @Entity(name = "listandcache_Leaf") @NamePattern("%s|description") public class Leaf extends StandardEntity {
}
eclipselink.cache.shared.listandcache_Tree = true eclipselink.cache.shared.listandcache_Leaf = true