Skip to content

Commit

Permalink
Merge origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
af.olivares10 authored and af.olivares10 committed Mar 15, 2017
2 parents 6a4c050 + e413401 commit 27359f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ public ReviewEntity find(Long id) {
}

public List<ReviewEntity> findAll(Long id) {
TypedQuery<ReviewEntity> q = em.createQuery("select u from ReviewEntity u WHERE u.funcion = :hola", ReviewEntity.class);
TypedQuery<ReviewEntity> q = em.createQuery("select u from ReviewEntity u WHERE u.funcion.id = :hola", ReviewEntity.class);
q = q.setParameter("hola", id);
List<ReviewEntity> allReviews = q.getResultList();
return allReviews;
}
public List<ReviewEntity> findAllparaFuncion(Long id)
{
TypedQuery<ReviewEntity> q = em.createQuery("select u from ReviewEntity u where u.funcion = :id", ReviewEntity.class);
TypedQuery<ReviewEntity> q = em.createQuery("select u from ReviewEntity u where u.funcion.id = :id", ReviewEntity.class);
q = q.setParameter("id", id);
List<ReviewEntity> revs = q.getResultList();
if (revs.isEmpty() ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ private List<ReviewDetailDTO> listEntity2DTO(List<ReviewEntity> entityList) {
}

@GET
public List<ReviewDetailDTO> getReviews(@QueryParam("id") Long id)
public List<ReviewDetailDTO> getReviews(@PathParam("id") Long id)
{
System.out.println("hola");
return listEntity2DTO(logic.getReviews(id));
}
@POST
Expand Down

0 comments on commit 27359f7

Please sign in to comment.