Hello,
I�m having a problem makin an HQL. I need to instantiate a Value Object getting the value from another. I have VO1 and VO2. VO1 has a var Long VO2, wich is its Id. So I make a constructor on VO1:
public VO1(Long id,
String vo2Name){
setId(id);
setVo2Name(vo2Name);
}
I want to get the name from VO2 and Id from VO1. So I tried:
select new VO1(v1.id,v2.name) from VO1 as v1, VO2 as v2
but it didn�t work. How can I make it?
thanks!