I have two tables A and B and both of them donot have any referential integrity. However one field of both the tables is common say 'commonId'. I need to fetch values from both the tables and return and im using the commonId to establish a join. The data returned is just one column repeated n number of times where n=actual no of records it should have actually returned. If i run the query printed in my database it runs correct data where as the same query returns incorrect data if ran through hibernate interfaces. sample query select A.commonid as commonid0_, A.alarmName as alarmName0_, A.moName as moName0_, A.moType as moType0_, B_.id as id2_, B_.displayName as displayN3_2_ from tableA A inner join tableB B_ on A.moid=B_.moid where A.moName='10.64.91.45' ANy help would be appreciable.
Thanks
|