inline....


On Tue, Mar 21, 2017 at 9:13 AM, Lukas Eder <[email protected]> wrote:

>
>
> 2017-03-21 15:01 GMT+01:00 Samir Faci <[email protected]>:
>
>> I think the Record type is a bit too complex for a simple model, which is
>> why I prefer the Pojo.  I think I've tried using a record in the past and
>> Jackson was serializing more data then was really needed to be returned.
>>
>
> Oh, I see. Indeed, Jackson defines its serialisation rules through what's
> available via reflection, so type hierarchies don't really help here. On
> the other hand, jOOQ 3.10 will include Record.formatJSON(), so perhaps
> Jackson won't be necessary here?
>

I'm sure the .formatJSON() would be handy.  though since swagger pukes out
I'd have to define the return type as a String which removes most of the
benefits of having a model class.


>
>
>> Also, the swagger introspection seems to puke out on me when I try to use
>> the record data type.  I can look into it a bit more if you'd like, but
>> mainly I think the object contains state and other attributes that aren't
>> really necessary when all you want to convey is "Here's some data".
>>
>
> Oh, interesting. Yes, I guess in that case, POJOs are the ideal solution.
>

Yup.  POJOs work great,  I've also extended the class at times, and added
the swagger annotation and documentation required.  It's really handy, and
the back and forth between records and pojos are very handy as well.


Anyways, this is sort of a tangent.  +1 on the DAO drop.


>
> Thanks for sharing!
>
> --
> 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.
>



-- 
Thank you
Samir Faci
https://keybase.io/csgeek

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