class A {
def afterLoad() {
A.withTransaction {
}
}
}
Most case, it works, until I call below list in controller
A.createCriteria().list{.....}
will throw exception:org.hibernate.HibernateException: Found two representations of same collection
If I remove
A.withTransaction
It will then works.