0 Replies Latest reply on Mar 19, 2007 1:59 AM by mariocardinale

    POJO created in the client has null properties when inside t

    mariocardinale

      I have an EJB3 entity POJO mapped with Hibernate and a stateless session bean that is supposed to persist it.
      The POJO is created in the client and then passed to the bean to save it.
      For example:
      MyClass c = new MyClass();
      c.setProp1 = "prop1";
      c.setProp2 = "prop2";
      myBean.save(c);

      However, inside the bean all the properties of the passed object are null.
      When I call
      em.merge(c);
      em.persist(c);
      only nulls are saved in the database.
      I suspect the bean is actually accessing a proxy so how can I get the properties that were set in the client?