[jboss-user] [JBoss Seam] - Managed(Hibernate)Entity usage question

baz do-not-reply at jboss.com
Wed Aug 9 06:30:37 EDT 2006


Hello, 
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>
  | 	<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>
  | 	</component>
  | 
I can use bazProject as expected. i define an attribute like so
	@Out(required=false,scope=ScopeType.SESSION)
  | 	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

	@Out(required=false,scope=ScopeType.SESSION)
  | 	private String bazExperimentID;
  | 
setting the attribute like so
bazExperimentID=getExperiment().getId().toString();

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.
Ciao,
Carsten

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964015#3964015

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964015



More information about the jboss-user mailing list