[KEYCLOAK-5726] - Fixes the parameter value when making queries
This commit is contained in:
1 parent
7dd7b6b984
commit
bc12193c3c
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -90,7 +90,7 @@ public class AlbumService {
|
||||
@Path("{id}")
|
||||
@Produces("application/json")
|
||||
public Response findById(@PathParam("id") String id) {
|
||||
List result = this.entityManager.createQuery("from Album where id = :id").setParameter("id", id).getResultList();
|
||||
List result = this.entityManager.createQuery("from Album where id = :id").setParameter("id", Long.valueOf(id)).getResultList();
|
||||
|
||||
if (result.isEmpty()) {
|
||||
return Response.status(Status.NOT_FOUND).build();
|
||||
|
||||
Reference in new issue
Block a user