-->
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: Hibernate NamedQuery issue
PostPosted: Mon Feb 27, 2012 12:59 pm 
Newbie

Joined: Sun Feb 19, 2012 7:23 pm
Posts: 5
Hello Frnds,

I want to implement a common method for same type of requirement. Let me give u example :
for Currency, Category tables i have created model and these model implements an interface.

interface CommonObject{}
pubilc class Currency implements CommonObject{...}

now my CommonDaoImpl contains NamedQuery :
query = "from tablename = :tableName order by sortcolunmnam = :sorColunmName asc"

sessionFactory.getCurrentSession().getNamedQuery(query).setParameter(0, tablename).setParameter(1, sortOrderName).list();

I am getting exception :
org.hibernate.MappingException: Named query not known: query



please suggest i havn't give u exact code stil u can understand where i am stuck !!
plz help me..


Top
 Profile  
 
 Post subject: Re: Hibernate NamedQuery issue
PostPosted: Mon Feb 27, 2012 1:54 pm 
Newbie

Joined: Sun Feb 19, 2012 7:23 pm
Posts: 5
He I have sorted a few now it is giving me new exception :

Caused by: org.hibernate.HibernateException: Errors in named queries


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.