Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HQL result

 
jacob deiter
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all
If I use HQL Join statement as

select e.empid, l.name from employee as e
left outer join locations as l on e.empid = l.empid.



if result conatin empid from Employee table and name from LOcation TAble.How the result can be converted into Object.Is the result converted in to New Object(with property empid and name) or any of the object(employee,location) ?.PLease coorect me if i am wrong

pls ignore any syntax error:-)

Asssume table column and object property having same name

Class Employee {

int empid;

Nessary method

}

Class Location {

Int empid
String Name ;

Nessary method

}
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic