-->
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.  [ 1 post ] 
Author Message
 Post subject: New to Hibernate joins - help please
PostPosted: Mon Mar 08, 2004 5:30 pm 
Beginner
Beginner

Joined: Mon Mar 08, 2004 5:22 pm
Posts: 35
Here is my sql query. what are my options ?
1. Do i need to create separate java class for each table ?
2. Why can't i create a class with all the selected fields [abstact] and run the regular SQL in session.find()?

Pardon me. This is my first hibernate attempt.

--------------------------------------------------------------------------
select l.zip_code, l.city, l.state, f.sky24, c.temperature,c.wind_speed, c.relative_humidity
from weather_location l, weather_forecast f, weather_current c
WHERE l.zip_code = 30346
and l.station_id = c.station_id
and l.location_id = f.location_id
and f.day_of_week = 2
order by l.zip_code;
---------------------------------------------------------------------------

Thanks
Raj


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.