-->
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.  [ 2 posts ] 
Author Message
 Post subject: Trying to map many-to-one without using primary key
PostPosted: Fri Aug 05, 2005 5:59 pm 
Newbie

Joined: Fri Aug 05, 2005 5:37 pm
Posts: 2
I am trying to map between two objects, CommunicationRecord and OutputType

The primary key for OutputType is outputIdn (Integer) and effectiveDate (Date).

There is a column on CommunicationRecord called outputIdn that can be joined to OutputType provided that you specify the following conditions on OutputType (effectiveDate <= sysdate and cancelDate > sysdate)

If I try mapping a many-to-one I get an error
[0] Foreign key (FK6FA9E6CD745568C6:WBT_CMM [OUT_IDN])) must have same number of columns as the referenced primary key (WBT_OUT_TYP [OUT_IDN,REF_EFF_DTE])

Of which I understand. Is there a way I can write a query using HQL to join the two tables or do I have to resort to a SQL query.

Hibernate version: 3.0.3

Mapping documents:
CommunicationRecord.hbm
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-cascade="save-update">
<class name="org.wcb.rea.communication.dto.CommunicationRecord" table="WBT_CMM">
<composite-id>
<key-property name="communicationIdn" column="CMM_IDN" type="integer"/>
<key-property name="effectiveDate" column="REF_EFF_DTE" type="org.wcb.common.orm.usertype.PersistentTimestamp"/>
</composite-id>
<timestamp name="controlTimestamp" column="CTL_TMS"/>
<property name="activityCompletedIndicator" column="ATY_CPL_IND" type="integer"/>
<property name="addressIdn" column="ADD_IDN" type="integer"/>
<property name="asOfDate" column="AS_OF_DTE" type="timestamp"/>
<property name="businessIdn" column="BUS_IDN" type="integer"/>
<property name="businessNameSequenceNumber" column="BUS_NME_SEQ_NUM" type="integer"/>
<property name="businessNotesSequenceNumber" column="BUS_NTS_SEQ_NUM" type="integer"/>
<property name="cancelDate" column="REF_CAN_DTE" type="timestamp"/>
<property name="communicationStatus" column="CMM_STS" type="string"/>
<property name="communicationStatusReason" column="CMM_STS_RSN" type="string"/>
<property name="communicationUserIdn" column="CMM_USR_IDN" type="integer"/>
<property name="contactName" column="CTC_NME" type="string"/>
<property name="contactNumber" column="CTC_NUM" type="string"/>
<property name="controlFunctionIdn" column="CTL_FNC_IDN" type="text"/>
<property name="controlUserIdn" column="CTL_USR_IDN" type="integer"/>
<property name="conversionIndicator" column="CNV_IND" type="boolean"/>
<property name="correspondenceType" column="CRP_TYP" type="string"/>
<property name="endDate" column="END_DTE" type="timestamp"/>
<property name="expectedResponseDate" column="EXC_RSP_DTE" type="date"/>
<property name="faxAttentionIndicator" column="FAX_ATD_IND" type="integer"/>
<property name="followupIndicator" column="FLW_UP_IND" type="boolean"/>
<property name="incomingIndicator" column="ING_IND" type="boolean"/>
<property name="notifiedUserIdentifer" column="NOT_USR_IDN" type="integer"/>
<property name="outputIdn" column="OUT_IDN" type="integer" />
<property name="outputType" column="OUT_TYP" type="string"/>
<property name="resendDate" column="RSD_DTE" type="timestamp"/>
<property name="responseDate" column="RSP_DTE" type="date"/>
<property name="sourceCommunicationIdn" column="SRC_CMM_IDN" type="integer"/>
<property name="sourceKeyIdn" column="SRC_KEY_IDN" type="integer"/>
<property name="startDate" column="STA_DTE" type="timestamp"/>
</class>
</hibernate-mapping>

OutputType.hbm
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping default-cascade="save-update">
<class name="org.wcb.rea.communication.dto.OutputType" table="WBT_OUT_TYP">
<composite-id>
<key-property name="outputIdn" column="OUT_IDN" type="integer"/>
<key-property name="effectiveDate" column="REF_EFF_DTE" type="org.wcb.common.orm.usertype.PersistentTimestamp"/>
</composite-id>
<timestamp name="controlTimestamp" column="CTL_TMS"/>
<property name="batchOutputSize" column="BTH_OUT_SIZ" type="integer"/>
<property name="cancelDate" column="REF_CAN_DTE" type="timestamp"/>
<property name="controlFunctionIdn" column="CTL_FNC_IDN" type="integer"/>
<property name="controlUserIdn" column="CTL_USR_IDN" type="integer"/>
<property name="driverService" column="DRV_SER" type="string"/>
<property name="emailAllIndicator" column="EML_ALL_IND" type="boolean"/>
<property name="environmentLocation" column="ENV_LOC" type="string"/>
<property name="faxAllIndicator" column="FAX_ALL_IND" type="boolean"/>
<property name="jetform" column="JET_FRM" type="boolean"/>
<property name="jetformLetterTemplate" column="JET_LTR_TEM" type="string"/>
<property name="modifedAfterGeneratedIndicator" column="MOD_AFT_GEN_IND" type="boolean"/>
<property name="outputFileName" column="OUT_FLE_NME" type="string"/>
<property name="outputName" column="OUT_NME" type="string"/>
<property name="outputTypeCode" column="OUT_TYP_CDE" type="string"/>
<property name="ownerTransaction" column="OWN_TXN" type="integer"/>
<property name="paperType" column="PPR_TYP" type="string"/>
<property name="printAllIndicator" column="PRT_ALL_IND" type="boolean"/>
<property name="printQueue" column="PRT_QUE" type="string"/>
<property name="reportPrintIndicator" column="REP_PRT_IND" type="boolean"/>
<property name="signedUserIdentifier" column="SIG_USR_IDN" type="integer"/>
<property name="signedUserPosition" column="SIG_USR_POS" type="string"/>
</class>
</hibernate-mapping>

Full stack trace of any exception that occurs:
During development the follow error has occurred:

EJB Exception: : javax.ejb.EJBException: nested exception is: org.hibernate.hql.ast.QuerySyntaxError: Path expected for join! [from org.wcb.rea.communication.dto.CommunicationRecord cr join OutputType ot where cr.outputIdn = ot.outputIdn and ot.outputTypeCode = :outputTypeCode and ot.outputName = :outputName and cr.businessIdn = :businessIdn and cr.effectiveDate <= :today and ot.effecticeDate <= :today and cr.cancelDate > :today and ot.cancelDate > :today and cr.sourceKeyIdn = (select max(eps.epsIdn) from org.wcb.rea.employer.payrollStatement.dto.Eps eps where eps.effectiveDate <= :today and eps.cancelDate > :today and eps.businessIdn = :businessIdn)]
org.hibernate.hql.ast.QuerySyntaxError: Path expected for join! [from org.wcb.rea.communication.dto.CommunicationRecord cr join OutputType ot where cr.outputIdn = ot.outputIdn and ot.outputTypeCode = :outputTypeCode and ot.outputName = :outputName and cr.businessIdn = :businessIdn and cr.effectiveDate <= :today and ot.effecticeDate <= :today and cr.cancelDate > :today and ot.cancelDate > :today and cr.sourceKeyIdn = (select max(eps.epsIdn) from org.wcb.rea.employer.payrollStatement.dto.Eps eps where eps.effectiveDate <= :today and eps.cancelDate > :today and eps.businessIdn = :businessIdn)]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:196)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:821)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:779)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:588)
at org.wcb.rea.communication.dao.CommunicationRecordDAO.getEPSCommunicationRecordForBusiness(CommunicationRecordDAO.java:51)
at org.wcb.rea.employer.payrollStatement.ejb.EmployerPayrollStatementServices.getEpsCommunicationRecord(EmployerPayrollStatementServices.java:86)
at org.wcb.rea.employer.payrollStatement.ejb.EmployerPayrollStatementServices_mc08l6_EOImpl.getEpsCommunicationRecord(EmployerPayrollStatementServices_mc08l6_EOImpl.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.control.EJBControlImpl.invoke(EJBControlImpl.jcs:665)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:248)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(JcsContainer.java:85)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:224)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:207)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:62)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:153)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:168)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(ServiceHandleImpl.java:436)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(WlwProxyImpl.java:326)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(WlwProxyImpl.java:315)
at $Proxy73.getEpsCommunicationRecord(Unknown Source)
at EmployerPayrollStatementWeb.PayrollStatementController.initialize(PayrollStatementController.jpf:438)
at EmployerPayrollStatementWeb.PayrollStatementController.begin(PayrollStatementController.jpf:427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1519)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1445)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:776)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:606)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:1354)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:328)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.java:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:637)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6722)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
Caused by: Path expected for join!
at org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:252)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:2523)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2367)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2276)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:512)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:370)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:200)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:150)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
... 76 more
javax.ejb.EJBException: nested exception is: org.hibernate.hql.ast.QuerySyntaxError: Path expected for join! [from org.wcb.rea.communication.dto.CommunicationRecord cr join OutputType ot where cr.outputIdn = ot.outputIdn and ot.outputTypeCode = :outputTypeCode and ot.outputName = :outputName and cr.businessIdn = :businessIdn and cr.effectiveDate <= :today and ot.effecticeDate <= :today and cr.cancelDate > :today and ot.cancelDate > :today and cr.sourceKeyIdn = (select max(eps.epsIdn) from org.wcb.rea.employer.payrollStatement.dto.Eps eps where eps.effectiveDate <= :today and eps.cancelDate > :today and eps.businessIdn = :businessIdn)]
at org.wcb.rea.employer.payrollStatement.ejb.EmployerPayrollStatementServices.getEpsCommunicationRecord(EmployerPayrollStatementServices.java:88)
at org.wcb.rea.employer.payrollStatement.ejb.EmployerPayrollStatementServices_mc08l6_EOImpl.getEpsCommunicationRecord(EmployerPayrollStatementServices_mc08l6_EOImpl.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.runtime.core.control.EJBControlImpl.invoke(EJBControlImpl.jcs:665)
at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:423)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:396)
at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:248)
at com.bea.wlw.runtime.jcs.container.JcsContainer.invoke(JcsContainer.java:85)
at com.bea.wlw.runtime.core.bean.BaseContainerBean.invokeBase(BaseContainerBean.java:224)
at com.bea.wlw.runtime.core.bean.SLSBContainerBean.invoke(SLSBContainerBean.java:103)
at com.bea.wlwgen.StatelessContainer_ly05hg_ELOImpl.invoke(StatelessContainer_ly05hg_ELOImpl.java:207)
at com.bea.wlwgen.GenericStatelessSLSBContAdpt.invokeOnBean(GenericStatelessSLSBContAdpt.java:62)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.runAsInvoke(BaseDispatcherBean.java:153)
at com.bea.wlw.runtime.core.bean.BaseDispatcherBean.invoke(BaseDispatcherBean.java:54)
at com.bea.wlw.runtime.core.bean.SyncDispatcherBean.invoke(SyncDispatcherBean.java:168)
at com.bea.wlw.runtime.core.bean.SyncDispatcher_k1mrl8_EOImpl.invoke(SyncDispatcher_k1mrl8_EOImpl.java:100)
at com.bea.wlw.runtime.core.dispatcher.Dispatcher.remoteDispatch(Dispatcher.java:161)
at com.bea.wlw.runtime.core.dispatcher.ServiceHandleImpl.invoke(ServiceHandleImpl.java:436)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl._invoke(WlwProxyImpl.java:326)
at com.bea.wlw.runtime.core.dispatcher.WlwProxyImpl.invoke(WlwProxyImpl.java:315)
at $Proxy73.getEpsCommunicationRecord(Unknown Source)
at EmployerPayrollStatementWeb.PayrollStatementController.initialize(PayrollStatementController.jpf:438)
at EmployerPayrollStatementWeb.PayrollStatementController.begin(PayrollStatementController.jpf:427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.bea.wlw.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:1519)
at com.bea.wlw.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:1445)
at com.bea.wlw.netui.pageflow.FlowController.internalExecute(FlowController.java:776)
at com.bea.wlw.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:211)
at com.bea.wlw.netui.pageflow.FlowController.execute(FlowController.java:606)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:1354)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:650)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:328)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.superForward(PageFlowRequestProcessor.java:1301)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor$DefaultHttpRedirector.forward(PageFlowRequestProcessor.java:1317)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.doForward(PageFlowRequestProcessor.java:1199)
at com.bea.wlw.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:637)
at com.bea.wlw.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:527)
at com.bea.wlw.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:152)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6722)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
; nested exception is:
javax.ejb.EJBException: nested exception is: org.hibernate.hql.ast.QuerySyntaxError: Path expected for join! [from org.wcb.rea.communication.dto.CommunicationRecord cr join OutputType ot where cr.outputIdn = ot.outputIdn and ot.outputTypeCode = :outputTypeCode and ot.outputName = :outputName and cr.businessIdn = :businessIdn and cr.effectiveDate <= :today and ot.effecticeDate <= :today and cr.cancelDate > :today and ot.cancelDate > :today and cr.sourceKeyIdn = (select max(eps.epsIdn) from org.wcb.rea.employer.payrollStatement.dto.Eps eps where eps.effectiveDate <= :today and eps.cancelDate > :today and eps.businessIdn = :businessIdn)]
caused by: : javax.ejb.EJBException: nested exception is: org.hibernate.hql.ast.QuerySyntaxError: Path expected for join! [from org.wcb.rea.communication.dto.CommunicationRecord cr join OutputType ot where cr.outputIdn = ot.outputIdn and ot.outputTypeCode = :outputTypeCode and ot.outputName = :outputName and cr.businessIdn = :businessIdn and cr.effectiveDate <= :today and ot.effecticeDate <= :today and cr.cancelDate > :today and ot.cancelDate > :today and cr.sourceKeyIdn = (select max(eps.epsIdn) from org.wcb.rea.employer.payrollStatement.dto.Eps eps where eps.effectiveDate <= :today and eps.cancelDate > :today and eps.businessIdn = :businessIdn)]

Name and version of the database you are using:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 05, 2005 6:31 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 7:11 am
Posts: 85
You can try use "formula" tag/attribute.

http://www.hibernate.org/hib_docs/v3/re ... ing-column


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.