It's actually already a feature request:
https://github.com/jOOQ/jOOQ/issues/2530

On a lower level, several columns could be combined into a synthetic
compound column, or a nested record (as in
https://github.com/jOOQ/jOOQ/issues/2360). PostgreSQL and Oracle also know
named nested records (UDTs / object types), which are already supported by
jOOQ. These synthetic compound column then act like any other regular
column, and could even be used by the DefaultRecordMapper.

This is work in progress, but we can't promise any arrival date as it isn't
easy to implement consistently throughout jOOQ.

Hope this helps, for now
Lukas

2015-06-24 12:49 GMT+02:00 Thomas Gaupp <[email protected]>:

>  Hi Brent
>
> Yes, it is a hack. I will put your request "bind multiple db columns to
> custom class" on the feature request list.
>
> Best Regards,
> Thomas
>
> ------ Originalnachricht ------
> Von: "Brent Douglas" <[email protected]>
> An: [email protected]
> Cc: [email protected]
> Gesendet: 21.06.2015 23:42:17
> Betreff: Re: Mapping two sql columns into one Java field
>
>
> Hi Thomas,
>
> Do you mean call concat in the db and then parse the result out of the
> string? That seems fairly hacky and IMO is not really an acceptable
> solution for what I am looking for. If that is the only way to do it I'd
> rather just bind them manually, but I thought I would check if the
> functionality exists. Ideally I would be able to define an extra field that
> got added to the pojo/record/whatever, in addition to the other fields (as
> in the currency and amount fields should still be mapped to String (or
> Currency through a Converter) and BigDecimal respectively).
>
> Brent
>
>  --
> 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.
>

-- 
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.

Reply via email to