posted 16 years ago
i have a DO class and having properties like int, long and Set.
i want to access all these properties using projections. i can able to get only for int, long and not for Set. when i exceuted this one getting NullPointerException for Set. please give me suggession to resolve this problem.
List clientAccountIter = (List) session.createCriteria
(ClientAccount.class)
.setProjection(Projections.projectionList()
.add(Projections.property("clientAccount.clientAcctId"))
.add(Projections.property("clientAccount.clientAcctNum"))
.add(Projections.property("clientAccount.clientAccounts")))
.add(Restrictions.eq("registrationReference.regRefId", regRefId))
.list();
here i can get the values for clientAcctId, clientAcctNum and not for clientAccounts. clientAccounts is a Collection property