Commit 7e9040fd by Rubén Ramírez

feat: [RepositorioRecurso]: Añadidas dos funciones para buscar

parent ccc8c1ad
......@@ -127,4 +127,14 @@ public class RepositorioRecurso {
return media != null ? media : 0.0;
}
public List<Recurso> findAll() {
return em.createQuery("SELECT r FROM Recurso r", Recurso.class).getResultList();
}
public List<Recurso> findAllById(List<Long> ids) {
return em.createQuery("SELECT r FROM Recurso r WHERE r.id IN :ids", Recurso.class)
.setParameter("ids", ids)
.getResultList();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment