-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: HELP:Exception occur when I use formula as part of Component
PostPosted: Wed Mar 10, 2004 6:50 pm 
Newbie

Joined: Thu Mar 04, 2004 5:41 am
Posts: 10
using hibernate 2.1.2
jbsss 3.2.3

14:36:48,311 ERROR [Configuration] Could not compile the mapping document

net.sf.hibernate.MappingException: properties of components may not be formulas: platformName

at net.sf.hibernate.cfg.Binder.bindComponent(Binder.java:858)

at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1028)

at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:352)

at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229)

at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)

at com.scea.npd.psupdater.service.common.hibernate.HibernateConfiguration.addInputStream(HibernateConfiguration.java:79)

at net.sf.hibernate.cfg.Configuration.addResource(Configuration.java:315)

at net.sf.hibernate.cfg.Configuration.doConfigure(Configuration.java:973)

at net.sf.hibernate.cfg.Configuration.configure(Configuration.java:952)

at com.scea.npd.psupdater.service.middletier.persistence.PackageDb.<init>(PackageDb.java:46)

at com.scea.npd.psupdater.service.middletier.persistence.DlsDb.<clinit>(DlsDb.java:29)

at com.scea.npd.psupdater.service.middletier.entity.DlsManager.<clinit>(DlsManager.java:25)

at com.scea.npd.psupdater.service.middletier.DlsUpdaterBean.<clinit>(DlsUpdaterBean.java:27)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)



<component name="empComp" class="component.EmpComponent">
<property name="EmpId" type="java.lang.String" column="Emp_ID" not-null="true" length="10"/>
<property name="EmpName" formula="
(select EmpName from Emp where Emp.Emp_id=EmpId)" />
</component>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 6:53 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Well thats pretty clear, isn't it? You cant use formula inside of a component.


Top
 Profile  
 
 Post subject: PLEASE SUGGEST SOME ALTERNATIVE
PostPosted: Wed Mar 10, 2004 6:56 pm 
Newbie

Joined: Thu Mar 04, 2004 5:41 am
Posts: 10
I have EmpTO available in memory how to retrieve value for empName from EMPTO and assign it to component property


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.