diff --git a/examples/authz/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java b/examples/authz/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java index 1fe66757b5..e84e24d7b2 100644 --- a/examples/authz/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java +++ b/examples/authz/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java @@ -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(); diff --git a/testsuite/integration-arquillian/test-apps/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java b/testsuite/integration-arquillian/test-apps/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java index a1230d8a73..7969492735 100644 --- a/testsuite/integration-arquillian/test-apps/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java +++ b/testsuite/integration-arquillian/test-apps/photoz/photoz-restful-api/src/main/java/org/keycloak/example/photoz/album/AlbumService.java @@ -99,7 +99,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).getResultList(); + List result = this.entityManager.createQuery("from Album where id = " + Long.valueOf(id)).getResultList(); if (result.isEmpty()) { return Response.status(Status.NOT_FOUND).build();