This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
i want to get records from two tables by using join query. but i got the queryexception error. i can't get the multiple column values from two tables. how i will write the select query for getting records from two tables. pl. help me(if possible)
Your exception is probably because this query is a bit of a mess. I'd try to write the query directly in SQL in whatever DB tool you have. You'll get pointers from the DB as to what's wrong.
btw: SessionFactory is an expensive Object to create ! You should not create it every method call. Instead keep it somewhere and jsut create new Sessions. Check out the hibernate wiki pages for some receomendations.
pascal
bamini mini
Greenhorn
Joined: May 05, 2004
Posts: 3
posted
0
hi i cant get multiple column values by using the foll. query.
supplierList=sess.find("select a.id,a.desc,from groupAccount a in(b.msupplier,b.mnumber from supProduct b where a.id=b.supcode)");
when i am using this query in sql directly, i got the answer. but in session, i cant get the result.
i think i should use the join query or subclass query.
if anybody knows ,give that concept. when i am using in query method.
i got the following error.
unexpected token in query (i got this error in server) and iexplore i got the following error