Hello all,
I have two classes that are related but the first class only has the id of the second, and not a proper field. For example:
Code:
class Foo {
int id;
int barId;
}
class Bar {
int id;
String name;
}
The mapping of Foo has a simple property for barId.
I have to write a query on Foo using a DetachedCriteria if possible, and I need to have a Projection for Bar.name. Unfortunately I am not allowed to modify the classes. I am allowed to modify the mapping if I need to.
Is there a way to do this?
Thanks in advance,
Tomás