I have the following piece of code preteneciente to a REST service created automatically by Netbeans 8.2 after having created the entities using the Database.
@POST
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Transactional
public Response create(Butaca entity) {
entityManager.persist(entity);
return Response.created(URI.create(entity.getButacaPK().getIdButaca() + "," + entity.getButacaPK().getIdSector().toString())).build();
}
I do not identify how to solve the Int error.
Edited In the Return line it says int can not be deferenced , but I can not identify which Int. I add catch with the error.