I need to fetch only specific feilds instead of all fields. All my tables has audit feilds(4) . i want that to be ommitted on the selection. how to do that from mapping. is there any other way?.
Criteria criteria = session.createCriteria(Property.class, "property")
.createAlias("property.propertyType", "type").createAlias(
"property.propertyConcern", "propertyConcern",
CriteriaSpecification.LEFT_JOIN).createAlias(
"propertyConcern.concern", "concern",
CriteriaSpecification.LEFT_JOIN)
.setResultTransformer(
CriteriaSpecification.DISTINCT_ROOT_ENTITY);