Hi,
I have the following mapping file
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 1.1//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="edu.lsu.cct.gridmailjsr.services.config.Config" table="gridmailjsr_config">
<id name="oid" column="oid" type="java.lang.String" length="32">
<generator class="uuid.hex"/>
</id>
<property name="Griduser" type="string" column="griduser"/>
<property name="Emailid" type="string" column="emailid"/>
<property name="Displayname" type="string" column="displayname"/>
<property name="Inserver" type="string" column="inserver"/>
<property name="Inport" type="string" column="inport"/>
<property name="Inusername" type="string" column="inusername"/>
<property name="Inpass" type="string" column="inpass"/>
<property name="Outserver" type="string" column="outserver"/>
<property name="Outport" type="string" column="outport"/>
<property name="Outusername" type="string" column="outusername"/>
<property name="Outpass" type="string" column="outpass"/>
</class>
</hibernate-mapping>
When I execute the following query [from edu.lsu.cct.gridmailjsr.services.config.Config as config where config.griduser='root'] , I get the following exception ..... even though the griduser property id present in the mapping file . Any reason why this happens ????
net.sf.hibernate.QueryException: could not resolve property: griduser of: edu.lsu.cct.gridmailjsr.services.config.Config [from edu.lsu.cct.gridmailjsr.services.config.Config as config where config.griduser='root']
at net.sf.hibernate.persister.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:38)
at net.sf.hibernate.hql.PathExpressionParser.getPropertyType(PathExpressionParser.java:249)
at net.sf.hibernate.hql.PathExpressionParser.end(PathExpressionParser.java:288)
at net.sf.hibernate.hql.WhereParser.doPathExpression(WhereParser.java:336)
at net.sf.hibernate.hql.WhereParser.doToken(WhereParser.java:366)
at net.sf.hibernate.hql.WhereParser.token(WhereParser.java:251)
at net.sf.hibernate.hql.ClauseParser.token(ClauseParser.java:87)
at net.sf.hibernate.hql.PreprocessingParser.token(PreprocessingParser.java:123)
at net.sf.hibernate.hql.ParserHelper.parse(ParserHelper.java:29)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:149)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1554)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1525)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)[quote][/quote]
Code:
[b][/b]