i were planning on just putting the standard response here, but then i discovered what you are actually doing ;)
Lets take it step by step...
You create a criteria rooted in your DTO:
Code:
alReasons = hibSession.createCriteria(RStateReasonCodesDTO.class,"reason")
You tell hibernate to perform a projection so only the reason.RType is selected.
Code:
.setProjection( Projections.projectionList().add( Projections.property("reason.RType")))
Add a criterion so only get data back where RType is equal to "state"
Code:
.add(Property.forName("reason.RType").eq(new String("state")))
Set the resulttransformer to take the data returned per alias and transform it into a DTO bean.
Code:
.setResultTransformer(new AliasToBeanResultTransformer(RStateReasonCodesDTO.class)).list();
So now that you have done that why do you think that any property besides "RType" will be set on your DTO when you have explicitly told hibernate to only fetch that attribute ?
Think about that, and if you do not the next time i'll just insert the standard response ;)