The workaround is:
CollectionPersister collectionPersister = ((SessionImplementor) pcre.getSession()).getPersistenceContext().getCollectionEntry(pcre.getCollection()).getCurrentPersister(); collectionPersister.getCollectionMetadata().getRole();
Found in https://code.google.com/p/hibernate-audit/source/browse/tags/hibernate-audit-1.0.37/src/main/java/com/googlecode/hibernate/audit/synchronization/work/InsertCollectionAuditWorkUnit.java?r=837
|