Object[] rows = (Object[]) session .createCriteria(UserAccount.class) .setProjection( Projections.projectionList() .add(Projections.property("id")) .add(Projections.property("username")) .add(Projections.property("email")) .add(Projections.property("displayname"))) .add(Restrictions.eq("email", email)) .add(Restrictions.eq("password", password)) .add(Restrictions.eq("enabled", true)) .add(Restrictions.eq("role", Role.CUSTOMER)) .uniqueResult();
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)