2
I have a method of my API that does a database search
@RequestMapping(method = RequestMethod.GET, value = "/entidadesUsuarioPermissao/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Collection<PermissoesPaginas>> buscarEntidadesUsuarioP(@PathVariable Long id) {
Collection<PermissoesPaginas> entidadesBuscados = ppService.buscarTodas(id);
return new ResponseEntity<>(entidadesBuscados, HttpStatus.OK);
}
and all the information I need comes from:
however, when I debug in front-end the entity object does not appear
That’s my answer to the front end
note that the entity object does not appear.
the front-end method is this:
$http({
method : 'GET',
url : '/entidadesUsuarioPermissao/'+id
}).then(function(response) {
$scope.usuarios = response.data;
}, function(response) {
console.log(response.data);
console.log(response.status);
});
console output on screen
Not within users > permissionsPaginasCollection ?
– Diogo Soares