I have parent/child relationship between two tables, and the corresponding mapping in my Java classes. The tables roughly look like that:
A (ref number, stuf
with JPA 1 you can use the provided solution but change unwrap to getDelegate to be like that
Session session = (Session)entityManager.getDelegate();
and it's going to work.