Re: Hibernate basic question
- From: Markus Volkland <mvolkland@xxxxxxxxx>
- Date: Mon, 19 Jun 2006 18:17:29 +0200
.... like this?
session.createQuery("select new your.package.YourAppClass(a.x, b.x, b.y) from AEntity a, BEntity b where a.id = b.id and b.x in ( select x
from c ) ....");
where YourAppClass is like
class YourAppClass {
private String _ax;
private String _bx;
private String _by;
public YourAppClass (String ax, String bx, String by) {
_ax = ax;
_bx = bx;
_by = by
}
// getters and setters
...
}
hope this helps,
Markus
vk02720 schrieb:
Hi,.
Using Hibernate, I want to get the output of a complex query and map
the resulting columns my application class. How can I do that ?
For example
select a.x, b.x, b.y from a, b where a.id = b.id and b.x in ( select x
from c ) ....
I just need to map the three elements from the query result to my app
class.
Appreciate any help.
TIA
- References:
- Hibernate basic question
- From: vk02720
- Hibernate basic question
- Prev by Date: Re: Getting null when call execute() on a stored proc in sybase
- Next by Date: Re: Getting null when call execute() on a stored proc in sybase
- Previous by thread: Hibernate basic question
- Index(es):