Consider I have a DTO as follows
SampleChildDTO {
private String field1;
private String field2;
}
This DTO is represented inside another DTO
ParentDTO{
private String parentID;
*private SampleChildDTO child*;
}
I am using Criteria to generate queries to get data from Parent class and store data to ParentDTO object using Tranformers.aliasToBean().
But I wanted to use just one call to store the data for Child class which is mapped in Parent and this data should go to the object for SampleChildDTO inside ParentDTO. Is there any way to achieve this than writing a separate query?