How can I make this type safe?
Code:public List<Module> findAllWithAdmin( long adminId ) { return (List<Module>) sessionFactory.getCurrentSession().createQuery( "from Module module where module.admin.id = :adminId" ) .setParameter( "adminId", adminId ) .list(); }


Reply With Quote