-->
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.  [ 4 posts ] 
Author Message
 Post subject: JPA + Hibernate problem
PostPosted: Wed Jun 08, 2011 11:31 am 
Newbie

Joined: Sun Apr 11, 2010 10:17 pm
Posts: 3
I have these JPA named queries in my entity class, containing a 'select new' clause, and which work great in JPA environment.

When I try to bootstrap Hibernate with an AnnotationConfig invocation, then Hibernate tells me that these queries have errors.


What should I do ?

Can I tell hibernate not to process certain named queries ? Or what can I do ?


Top
 Profile  
 
 Post subject: Re: JPA + Hibernate problem
PostPosted: Wed Jun 08, 2011 1:38 pm 
Newbie

Joined: Wed Jun 08, 2011 12:50 pm
Posts: 8
Location: Germany
I'm not sure weather I understand you problem correctly.
But couldn't you use jpa with hibernate and use the hibernate session if you need features which aren't accessible in jpa?
This way you wouldn't run into problems with your jpql queries.


Top
 Profile  
 
 Post subject: Re: JPA + Hibernate problem
PostPosted: Wed Jun 08, 2011 5:11 pm 
Newbie

Joined: Sun Apr 11, 2010 10:17 pm
Posts: 3
The problem is that obviously Hibernate doesnt recognize 'select new' named queries. ;]

How can this be worked around ?


Top
 Profile  
 
 Post subject: Re: JPA + Hibernate problem
PostPosted: Thu Jun 09, 2011 1:14 am 
Newbie

Joined: Wed Jun 08, 2011 12:50 pm
Posts: 8
Location: Germany
Hm, I thought you were trying to make hql-queries work with jpa annotations.
Could you please post one of these queries and the error messsage you get?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.