3 Replies Latest reply on Aug 10, 2006 3:00 AM by Carsten Hoehne

    Managed(Hibernate)Entity usage question

    Carsten Hoehne Master

      i do have 2 Manged Entitys set up:

      <component name="bazProject" class="org.jboss.seam.core.ManagedHibernateEntity">
       <property name="entityClass">de.bafz.lims.model.Project</property>
       <property name="session">#{bazDatabase}</property>
       <property name="id">#{bazProjectID}</property>
       <property name="idClass">java.lang.String</property>
       <component name="bazExperiment" class="org.jboss.seam.core.ManagedHibernateEntity">
       <property name="entityClass">de.bafz.lims.model.Experiment</property>
       <property name="session">#{bazDatabase}</property>
       <property name="id">#{bazExperimentID}</property>
       <property name="idClass">java.lang.Long</property>

      I can use bazProject as expected. i define an attribute like so
       String bazProjectID;

      and in a method of my bean bazProjectID is set.

      But with bazExperiment i have trouble.
      1. question
      What type must the bazExperimentID be?
      I suppose java.lang.String

       private String bazExperimentID;

      setting the attribute like so

      After this bazExperimentID is in the session but accessing bazExperiment is ever null. Debuging my app tell me that getInstance from Managed(Hibernate)Entity is never called.

      What is wrong with bazExperiment?
      The only difference is that bazProject is used in an html page while bazExperiment is not.