This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Inner join problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Inner join problem" Watch "Inner join problem" New topic
Author

Inner join problem

Baktha Elumalai
Greenhorn

Joined: Mar 13, 2010
Posts: 28
I have two table

1. speeddemaill
2. highspeedd

speeddemail.java


Highspeedd.java



the main class


the sql output

select
speedemail0_.ID as ID7_0_,
highspeedd1_.ID as ID8_1_,
speedemail0_.ClientId as ClientId7_0_,
speedemail0_.Comments as Comments7_0_,
speedemail0_.Display as Display7_0_,
speedemail0_.GpsTime as GpsTime7_0_,
speedemail0_.Header as Header7_0_,
speedemail0_.Lat as Lat7_0_,
speedemail0_.Longi as Longi7_0_,
speedemail0_.ObjectId as ObjectId7_0_,
speedemail0_.Timestamp as Timestamp7_0_,
speedemail0_.Value as Value7_0_,
highspeedd1_.AlertType as AlertType8_1_,
highspeedd1_.ClientId as ClientId8_1_,
highspeedd1_.DisplayName as DisplayN4_8_1_,
highspeedd1_.FromTime as FromTime8_1_,
highspeedd1_.ObjectId as ObjectId8_1_,
highspeedd1_.Speed as Speed8_1_,
highspeedd1_.Status as Status8_1_,
highspeedd1_.Timestamp as Timestamp8_1_,
highspeedd1_.ToTime as ToTime8_1_
from
speedemaill speedemail0_
inner join
highspeedd highspeedd1_
on speedemail0_.ID=highspeedd1_.ObjectId
where
speedemail0_.ObjectId='18'

I need this type of sql output

select
speedemail0_.ID as ID7_0_,
highspeedd1_.ID as ID8_1_,
speedemail0_.ClientId as ClientId7_0_,
speedemail0_.Comments as Comments7_0_,
speedemail0_.Display as Display7_0_,
speedemail0_.GpsTime as GpsTime7_0_,
speedemail0_.Header as Header7_0_,
speedemail0_.Lat as Lat7_0_,
speedemail0_.Longi as Longi7_0_,
speedemail0_.ObjectId as ObjectId7_0_,
speedemail0_.Timestamp as Timestamp7_0_,
speedemail0_.Value as Value7_0_,
highspeedd1_.AlertType as AlertType8_1_,
highspeedd1_.ClientId as ClientId8_1_,
highspeedd1_.DisplayName as DisplayN4_8_1_,
highspeedd1_.FromTime as FromTime8_1_,
highspeedd1_.ObjectId as ObjectId8_1_,
highspeedd1_.Speed as Speed8_1_,
highspeedd1_.Status as Status8_1_,
highspeedd1_.Timestamp as Timestamp8_1_,
highspeedd1_.ToTime as ToTime8_1_
from
speedemaill speedemail0_
inner join
highspeedd highspeedd1_
on speedemail0_.ObjectId=highspeedd1_.ObjectId
where
speedemail0_.ObjectId='18'


please help how to do this one,

thanks in advance

Regards
Bakthavachalam E
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner join problem
 
Similar Threads
org.hibernate.QueryException: could not resolve property: ObjectId of: test.Objtablee
ava.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
How to get last insert id from one table and put in to the another table
Field 'ID' doesn't have a default value: org.hibernate.exception.GenericJDBCException: could not ins
org.hibernate.exception.GenericJDBCException: could not insert: