-->
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: org.hibernate.QueryException: could not resolve property: Tr
PostPosted: Thu Dec 14, 2006 7:32 pm 
Regular
Regular

Joined: Fri Nov 03, 2006 4:57 pm
Posts: 60
getting the following error for this code: org.hibernate.QueryException: could not resolve property: Transactions




List assignmentItems= session.createCriteria(AssignmentItems.class)
.createCriteria(Transactions.class, "tran")
.add( Restrictions.eq("department", 10) )
.setResultTransformer(Criteria.ALIAS_TO_ENTITY_MAP)
.list();
Iterator iter = assignmentItems.iterator();
while ( iter.hasNext() ) {
Map map = (Map) iter.next();
AssignmentItems assignmentItem = (AssignmentItems) map.get(Criteria.ROOT_ALIAS);
AssignmentItems transactions = (AssignmentItems) map.get("tran");
}





org.hibernate.QueryException: could not resolve property: Transactions of: com.dao.hibernate.AssignmentItems
org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43)
org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37)
org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1265)
org.hibernate.loader.criteria.CriteriaQueryTranslator.getPathEntityName(CriteriaQueryTranslator.java:190)
org.hibernate.loader.criteria.CriteriaQueryTranslator.createCriteriaEntityNameMap(CriteriaQueryTranslator.java:177)
org.hibernate.loader.criteria.CriteriaQueryTranslator.<init>(CriteriaQueryTranslator.java:83)
org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:58)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1531)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:298)
org.hibernate.impl.CriteriaImpl$Subcriteria.list(CriteriaImpl.java:143)
com.accuserverx.accucharge.web.SearchWorkListErrorsAction.execute(Unknown Source)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)


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.