Hi Lukas,
I am facing the same problem here.
JOOQ output:
"data1": "[B@518d0d6b"
But the actual data when I query postgres database
select encode(table1.data1, 'escape') as data from table1 where id =
'03681e16-278d-4e11-bfae-5f8740cd751b';
SQL output:
[startDate:null, description:ABC-123456789, isBundled:null,
externalId:null, endDate:null, taxCode:TX123]
But with JOOQ output is as below.
"data1": "[B@518d0d6b"
If I use record.get(TABLE1.data).toString() then the output is a huge
hexadecimal or something else.
Please advise.
On Wednesday, 29 January 2014 23:36:50 UTC+8, Lukas Eder wrote:
> That's really curious. jOOQ does not do any magic here. Just a plain
> simple call to JDBC's ResultSet.getBytes(). Do you get the same, funny
> behaviour when running your query through plain JDBC and accessing the byte
> array using ResultSet.getBytes(int)?
>
>
> 2014-01-29 <[email protected] <javascript:>>
>
>> Hello,
>>
>> thanks for your quick reply.
>>
>> I just do:
>>
>> Result<Record> records = context.select(<list of
>> fields>).from(DOCUMENTSTABLE).where(DOCUMENTSTABLE.IDELEMENT.eq(filters.getElementId())).fetch();
>>
>> And then I read the field's values with
>> record.getValue(DOCUMENTSTABLE.<tablefield>) for every field.
>>
>> The problem there was, that the returned value of the BLOB (bytea) field
>> was much larger than when writing the data.
>> I write and read it as byte array.
>> It turned out that the content of the read byte array was made of hex
>> numbers (in text format) instead of bytes containing the original data.
>>
>> Maybe there is a way to detect the returned type of data for postgres'
>> 'bytea' datatype from version 9 on.
>>
>> Greetings
>>
>> Mike
>>
>> --
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
--
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.