2 Replies Latest reply on Apr 14, 2010 4:26 PM by thokuest

    Property 'c1' not found on type org.hibernate.collection.PersistentSet

    jklink

      I am getting the error Property 'c1' not found on type org.hibernate.collection.PersistentSet when I try to de-reference an object in EL.


      I have three entities: EntityA, EntityB, and EntityC where there is a one-to-many mapping between EntityA and EntityB and a one-to-many mapping between EntityB and EntityC.  I do the following query in a componentA:




      ArrayList<EntityA> myA= (ArrayList<EntityA>) entityManager.createQuery("SELECT A FROM EntityA A").getResultList();





      where myA has been declared:




      @Out(required=false) private ArrayList<EntityA> myA;





      Within my XHTML page, I can reference fields of either myA, or of any of the EntityB's associated with myA.  However, if I try to de-reference twice and read myA.B.C.c1, I find that C is not populated.


      I've also tried the query


      SELECT A FROM EntityA A, EntityB B, EntityC C WHERE C.myB.id=B.id AND B.myA.id=A.id



      but that doesn't help.


      How do I go about populating EntityC in the PersistentSet?


      Thanks!