-->
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: Need to prevent parsing of complex legacy native SQL query.
PostPosted: Fri Sep 02, 2005 1:45 pm 
Newbie

Joined: Wed Aug 31, 2005 9:13 am
Posts: 8
Location: Springfield, VA
I just want to pass through the working SQL through Hibernate but have Hibernate convert rows back into objects.

Have several complex legacy SQL queries that blow up during Hibernate's parsing. Hibernate createSQLQuery() forces one to addEntiity() with an alias even though no alias is in legacy code. Put proper alias stuff in legacy and hell brakes loose during parsing.

No, I don't want to take time to convert all the queries to HQL and retest them all.



Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 02, 2005 3:55 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use h3.1 and <return-property> or if the queries return teh same column names as used in the mapping of the objects just dont specify any alias and it will work.

_________________
Max
Don't forget to rate


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.