1 Reply Latest reply on Sep 1, 2005 6:20 AM by epbernard

    HibernateProxy and JBeanMapper

    jc7442

      Hi,

      I use a JBeanMapper librairy to perform some mapping from persistent object to printable object. This library is based on XML file that describe the mapping and the conversion to perform.

      I have the following model:

      class A {
      B b;
      B getB() {...}
      }
      


      In my mapping file, I just need to say that to specify that A instances are map into ATO and B instances into BTO.

      Problem is that when I get a B instance using the getB method, hibernate return a HibernateProxy on B class, consequently JBeanMapper is not able to map B to BTO since it does not know that the proxy.

      I fix my problem by modifying JBeanMapper source code but I am not really happy with that.

      Is there something that may be configured in hibernate to not use HibernateProxy or is there a workaround ?

      Regards