-->
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.  [ 1 post ] 
Author Message
 Post subject: Exception while executing native SQL
PostPosted: Mon Sep 17, 2007 9:39 am 
Newbie

Joined: Thu May 18, 2006 6:36 am
Posts: 11
Location: Bangalore
Hi,

I am getting the following error while using native sql query,

Quote:
org.hibernate.QueryException: No column name found for property [user] for alias [pi] [Select
pycis.INSTN_ID_N as {pi.instnIdN},
pycis.INSTN_NM_C as {pi.instnNmC},
pycis.CIBS_ACCT_NUM_N as {pi.cibsAcctNumN},
pycis.TMPL_TYPE_LVL_3_C as {pi.cibsStrucCodeC},
pycis.CIBS_DISC_NM_C as {pi.cibsDiscNmC},
pycis.CIBS_SUBDISC_NM_C as {pi.cibsSubdiscNmC},
smple.userr as {pi.user},
smple.datte as {pi.updDt}
from
pcr.v_pycis_dwh_acct pycis ,
(Select instAtt.INSTN_ID_N as instanceId,instAtt.UPD_USR_C as userr,instAtt.UPD_DT_D as
datte from pcr.T_RPT_INSTN_ATRB instAtt where instAtt.DOMAIN_NM_C = 'PCR_Instn_Attrib'
and instAtt.ATRB_CODE_C = 'ASMPL' and instAtt.DEL_IND_C is null) smple
where pycis.INSTN_ID_N = smple.instanceId (+)]
at org.hibernate.loader.custom.sql.SQLQueryParser.resolveProperties(SQLQueryParser.java:195)
at org.hibernate.loader.custom.sql.SQLQueryParser.substituteBrackets(SQLQueryParser.java:104)
at org.hibernate.loader.custom.sql.SQLQueryParser.process(SQLQueryParser.java:51)


My PCRPycisBean is given below,
Code:

public class PCRPycisBean implements java.io.Serializable{
   
   private Long instnIdN;   
   private String instnNmC;
   private String tmplTypeLvl1c;
   private String tmplTypeLvl2c;
   private String tmplTypeLvl3c;
   private Long dwsAcctId;   
   private Long cibsAcctNumN;
   private String qimdPortfNumC;
   private String cibsDiscNmC;
   private String cibsDiscCodeC;
   private String cibsSubdiscCodeC;
   private String cibsSubdiscNmC;
   private String cibsStrucCodeC;
   private String qimdStrucCodeC;
   private String imBrandCodeC;
   private String asapAcctNmC;
   private Long asapAcctNumN;   
   
   private String user;
   private Date updDt;
   
        .... .. getters and setter
}


The query I am trying to execute is as follow's
Code:
   <sql-query name="accSamplingQuery">
    <return alias="pi" class="com.pyramis.pcrui.beans.PCRPycisBean" />
    <![CDATA[
          Select
            pycis.INSTN_ID_N as {pi.instnIdN},
            pycis.INSTN_NM_C as {pi.instnNmC},
            pycis.CIBS_ACCT_NUM_N  as {pi.cibsAcctNumN},
            pycis.TMPL_TYPE_LVL_3_C as {pi.cibsStrucCodeC},
            pycis.CIBS_DISC_NM_C as {pi.cibsDiscNmC},
            pycis.CIBS_SUBDISC_NM_C as {pi.cibsSubdiscNmC},
            smple.userr as {pi.user},
            smple.datte as {pi.updDt}
         from    
            pcr.v_pycis_dwh_acct pycis ,
               (Select instAtt.INSTN_ID_N as instanceId,instAtt.UPD_USR_C as userr,instAtt.UPD_DT_D as
                  datte  from pcr.T_RPT_INSTN_ATRB instAtt where instAtt.DOMAIN_NM_C = 'PCR_Instn_Attrib'
                     and instAtt.ATRB_CODE_C = 'ASMPL' and instAtt.DEL_IND_C is null) smple
               where pycis.INSTN_ID_N  = smple.instanceId  (+)
      ]]>
    </sql-query>


What can be the problem..

Thanks in advance,
Rohit


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

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.