-->
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: Override annotated query with hbm query?
PostPosted: Thu Jan 17, 2008 7:25 am 
Newbie

Joined: Wed Nov 16, 2005 6:09 pm
Posts: 5
Hi All,

My question is should I be able to use hibernate.mapping.precedence to resolve duplication of query names? According to the documentation "hibernate.mapping.precedence" is used to resolve conflicts between annotated classes and hbm files. But what about named queries?

I am using annotated classes to define the mappings and named queries - using only JPA annotations.

I have experimented with overriding named queries defined in hbm files and using hibernate extenstions (e.g. caching) in the hbm files.

I was hoping to be able to avoid Duplicate Query errors by specifying
Code:
hibernate.mapping.precedence = "hbm,class"
This does not work. Hibernate complains with DuplicateMappingException.

Would it make sense to extend hibernate.mapping.precedence to resolve conflicts with Named Queries?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 18, 2008 7:19 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
It might not be very easy, but if someone come up with a patch, why not.

_________________
Emmanuel


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.