Hello Ankur, I'm not quite sure what exactly you're asking here. The "into(Class)" operation is completely independent of what you queried before in your jOOQ SQL statement. By default, it follows the algorithm specification defined in DefaultRecordMapper: http://www.jooq.org/javadoc/latest/org/jooq/impl/DefaultRecordMapper.html
That algorithm can be overridden by implementing a custom RecordMapperProvider: http://www.jooq.org/doc/latest/manual/sql-execution/fetching/pojos-with-recordmapper-provider/ In order to fetch into HashMaps, there are a couple of relevant fetch methods as well (the list in the manual is non-exhaustive): http://www.jooq.org/doc/latest/manual/sql-execution/fetching/arrays-maps-and-lists/ Let me know if this answers your question(s). Lukas 2014-06-30 15:06 GMT+02:00 ankur bhargava <[email protected]>: > this might be silly but just to seek confirmation, > > I have a situation when I am querying one db table and I want fetched > records map to XyzRecord.java this we can achieve easily but what should be > done when query is resulting multiple columns from multiple tables and > we want to map it to a JAVA POJO kind of class. And we want it to store > fetched records in List<POJO> collection Or in any collection like HashMap. > > *DSLContext jOOQDslCtx = getJooqDslCtx(getDBConnection("mytestdb")); * > * List<AuthorRecord> authList = > jOOQDslCtx.select().from(Author.AUTHOR).fetchInto(AuthorRecord.class); * > > above code is working fine and I want to achieve the same in case of when > query fetches columns from multiple tables. > > Please advice! > Ankur > > > > -- > 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.
