-->
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: Complex SQL
PostPosted: Fri Feb 10, 2006 12:50 pm 
Newbie

Joined: Fri Feb 10, 2006 12:43 pm
Posts: 1
i'm new to hibernate and am researching using sql script. i was able to generate simple sql (single table) using session.createSQLQuery()

i wish now to create a more complex query based on the following:

SELECT A.ACCOUNT, A.TYPE,
C.LASTNAME, C.FIRSTNAME,
AD.ADDRESS1, AD.CITY
FROM schema.ACCOUNT A, schema.CONTACT C, schema.ADDRESS AD
WHERE C.ACCOUNTID = A.ACCOUNTID(+)
AND C.ADDRESSID = AD.ADDRESSID(+)
AND C.LASTNAME = 'myname'

what might the hbm.xml consist of? and is thera an HQL configuration that is more suited.

i wish to continue to use SQL due to the development team experience

any documentation links would be helpful

thanks -


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 10, 2006 2:30 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
well, your hbm.xml files are needed to map the tables and HQL is not a configuration language but a SQL abstraction language. you can continue to use native SQL through hibernate

http://www.hibernate.org/5.html

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


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.