I am making a select
by taking the result as below:
Optional<Object[]> oLista = query2.getResultList().stream().findFirst();
oLista2.isPresent
{
Integer ident = (Integer) oLista.get()[0];
}
You need to get the value but you are giving the following error
java.lang.Integer can not be cast to [Ljava.lang.Object;