Interesting, it makes sense of course. On the other hand, would a Record as a model returned by a REST service be sufficient? Or does the fact that it is still "attached" bother you?
2017-03-21 14:39 GMT+01:00 Samir Faci <[email protected]>: > I tend to use the auto-generated POJO for a simple entity. > > so if I had a table named User for example, I might just use the > auto-generated POJO as a Model returned by a REST service and just fetch > into it. > > That's definitely not sufficient when the tables get more complicated, but > it's free code I don't have to write. I didn't mean that POJO supported > all my use cases, but my use of auto-gen code is usually Records + Pojos, > once we get into custom code I can't get away from writing specialized > behavior, nor would I expect Jooq to support my internal uses. > > > > On Tue, Mar 21, 2017 at 6:33 AM, Lukas Eder <[email protected]> wrote: > >> Thanks a lot for the feedback, Samir >> >> 2017-03-21 14:20 GMT+01:00 Samir Faci <[email protected]>: >> >>> I looked at pulling DAO into our auto-generation code and never really >>> found much use to them. Usually the way they fetch a record isn't really >>> correct for my use case. >>> >>> ie. A lot of times fetching by the PKey isn't what I'm looking for and >>> at least when I was looking at this there wasn't really an obvious way of >>> doing custom fetching behavior or really to expand upon it. >>> >>> For simple Crud I'd much rather use the Record type. >>> >>> record.refresh() >>> record.update() >>> record.store() >>> >> >> That's exactly the point. >> >> >>> give me all I actually care about and the .fetchInto() combined with the >>> auto-generated pojos are all I've used. >>> >> >> Oh, interesting bit about the auto-generated POJOs. So, they're >> sufficient for (most) of your use-cases? From the jOOQ perspective, they're >> closely linked to the DAOs (so, the deprecation *might* also touch on that >> POJO generation). >> >> >>> +1 on dropping support for it. I don't object to DAO/Repository design >>> pattern but I find that I usually need to write customized >>> code rather then relying on auto-generated code for most of my use cases. >>> >> >> Exactly. The DAOs are too opinionated / simple for that customized >> implementation >> >> -- >> 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. > -- 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.
