Hi,
I've been looking around a bit everywhere and at the hibernate doc. So far I haven't found what I've been looking for.
Basically I want to know if you can use hibernate to perform queries on several tables and return the results as objects?
For instance I want show an overview of the top buying customers.
What I do now is the following:
-Use jdbc to execute a query.
-Return a list of objects.
The objects aren't directly mapped to a single table.
Have no relationships.
They're just statistical data objects.
What I would like to do is use Hibernate's HQL to write the query and have it automatically send me back objects.
I've thought of using table views. That would probaply accomplish it, but it 'd mean that I'd have to port my views to every possible db.
I'd like to stay database neutral!
Anybody know how this can be done, if it can be done?
If possible I'd appreciate pointers to online doc or example code would be most helpful.
Thx!
|