Hello Lukas, thanks for your time, I'm not using fetchOne (), just fetch ()
was to return more than 1000 records but stops at 43, when the value in the
TIPORESTRICAO field is null.
try {
ctx = DSL.using(connection, SQLDialect.MYSQL);
Result<Record> result = ctx.select()
.from(PEOPLE)
.orderBy(PEOPLE.LNUM)
.fetch();
for (Record r : result) {
pesquisaResponsavelDto = new PesquisaResponsavelDto();
pesquisaResponsavelDto.setResponsavelID(r.getValue(PEOPLE.LNUM));
int tipo = r.get(PEOPLE.TIPORESTRICAO);
responsavelList.add(pesquisaResponsavelDto);
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (ctx != null) {
ctx.close();
}
}
Em quinta-feira, 30 de agosto de 2018 08:31:58 UTC-3, Junior Manzini
escreveu:
>
>
> Hi... In the table I'm working on there is a field type SMALLINT, where
> some are null when trying to get this data (null) r.getValue (PEOPLE.TYPE)
> gives exception (null pointer) which does not happen when the field is
> VARCHAR or BLOB, these I can handle when they are null, Is there any way to
> test the null before reading?
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups "jOOQ
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.