have a peculiar problem with hibernate. I have a hibernate function like this.
@SuppressWarnings("unchecked")
public List<AppResponse> findByResponseId(long requestId) {
return (List<AppResponse>) jdbcReference.getSessionFactory().getCurrentSession()
.createCriteria(AppResponse.class).add(Restrictions.eq("requestId",requestId))
.list();
}
And this is supposed to return a list with 4 "AppResponses" for requestId=say '1234'. The function as expected returns a list with four AppResponse objects.But the problem is all 4 objects represent the same row. I dont get 4 different objects(one per row). Has anyone encountered such a issue.? What could be the problem ?