d.select( ..) .from( ... ).as("S") .where( ... ) .groupBy(groupByFields) .fetchInto(MyRow.class);My 2 cents: fetchInto() is a "predefined map method" . If you need more control, or use custom logic, as you described, you can use map() method instead.
Cheers
--
You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/f4u7FfAyyFY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
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 jooq-user+...@googlegroups.com.
CREATE TABLE foo as ( id integer, name text);
INSERT INTO foo values (1, 'foo'), (2, 'bar'), (3, 'baz');
package models;
import javax.persistence.Column;
public class Foo {
private String name; private int id; private String helper;
//NO default constructor public Foo(String helper) { this.helper = helper; } public String getName() { return name; }
public int getId() { return id; } @Column(name="name") public void setName(String name) { } public int getId() { return id; } @Column(name="id") public void setId(int id) { this.id = id; } }
DSLContext d;
...
d.resultQuery("select id, name from foo" ).fetch(r -> r.into(new Foo("helper")));