From: SSD (JIRA) <no...@at...> - 2006-05-16 00:10:17
|
org.hibernate.QueryException: could not resolve property -------------------------------------------------------- Key: HHH-1752 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1752 Project: Hibernate3 Type: Bug Components: query-hql Versions: 3.1 Environment: Linux, Struts Reporter: SSD Priority: Blocker I am getting exception(could not resolve property) when I do the following query : Query q1 = newSession.createQuery("from VsDomains domains where domains.dns_profile_id = :dns_profile") But everything is fine when I do the one below : Query q1 = newSession.createQuery("from VsDomains where dns_profile_id = :dns_profile_id"); Why is this occuring ? The VsDomains.hbm.xml file is as follows : <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- Generated May 12, 2006 11:21:53 AM by Hibernate Tools 3.1.0 beta3 --> <hibernate-mapping> <class name="VsDomains" table="VS_DOMAINS"> <id name="assetId" type="java.lang.Long"> <column name="ASSET_ID" precision="22" scale="0" /> <generator class="assigned" /> </id> <many-to-one name="vsMdnsAccountT" class="VsMdnsAccountT" fetch="select"> <column name="MDNS_ACCOUNT_NAME" length="100" /> </many-to-one> <many-to-one name="vsRegistrationProfileT" class="VsRegistrationProfileT" fetch="select"> <column name="REG_PROFILE_ID" precision="22" scale="0" /> </many-to-one> .................................. here is the property ---------> <property name="dnsProfileId" type="java.lang.Long"> <column name="DNS_PROFILE_ID" precision="22" scale="0" not-null="false" /> </property> ---------------> <property name="notes" type="string"> <column name="NOTES" length="4000" /> </property> <property name="renewalDate" type="java.lang.Long"> <column name="RENEWAL_DATE" precision="22" scale="0" /> </property> ... Exception full stack: DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <hibernate.transaction.JDBCTransaction> current autocommit status: false DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <hibernate.jdbc.JDBCContext> after transaction begin DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <engine.query.QueryPlanCache> unable to locate HQL query plan in cache; generating (from VsDomains d where d.dns_profile_id = :dns_profile_id) DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <hql.ast.QueryTranslatorImpl> parse() - HQL: from VsDomains d where d.dns_profile_id = :dns_profile_id DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <hql.ast.AST> --- HQL AST --- DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <hql.ast.ErrorCounter> throwQueryException() : no errors DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <hql.antlr.HqlSqlBaseWalker> select << begin [level=1, statement=select] DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <ast.tree.FromElement> FromClause{level=1} : com.verisign.dbms.portal.VsDomains (d) -> vsdomains0_ DEBUG 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <ast.tree.FromReferenceNode> Resolved : d -> vsdomains0_.ASSET_ID INFO 05/15/2006 17:08:02 <ExecuteThread: '59' for queue: 'default'> <com.verisign.dbms> <kshobhana-lnx.corpc.vrsn.com><DBMS><><DBMS-DBMS><><><EditAdminDNSProfileAction: Exception during Modify @loc#1org.hibernate.QueryException: could not resolve property: dns_profile_id of: VsDomains [from VsDomains d where d.dns_profile_id = :dns_profile_id]> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |