Hi Venkat, 2013/6/29 Venkat Sadasivam <[email protected]>
> I made pojo as immutable hence insert/update methods in dao becomes > irrelevant. Support for immutable POJOs was introduced after discussions with Adam Gent, author of JIRM: https://github.com/agentgt/jirm Immutability is useful in more functional-oriented architectures. Changing a POJO and inserting / updating it is possible of course, but requires a lot of manual work, copying values into a new instance. What made you think that insert/update methods would become irrelevant? > Can it generate methods for record? In principle, yes. jOOQ DAOs didn't have too much traction so far on this user group. I'm sure there is room for improvement. I have registered #2575 to improve DAO <-> Record interoperability. https://github.com/jOOQ/jOOQ/issues/2575 > Also I would like to know from jOOQ design perspective when to use pojos > and records. > jOOQ doesn't want to drive your design, it simply offers simple (active) records and simple POJOs for convenience. jOOQ also offers enough tools to transform "flat" database results into your own DTO structures using RecordMapper: http://www.jooq.org/doc/3.0/manual/sql-execution/fetching/recordmapper The RecordMapper type will be strengthened in jOOQ 3.1, when a new RecordMapperProvider can be registered in jOOQ's Configuration, overriding the various ways of transforming a Record "into()" a custom type. Hope this helps Lukas -- 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/groups/opt_out.
