Hello, You have two options that I can see right now:
1. Use DSL.selectFrom(t1) or DSLContext.selectFrom(t1) instead. These methods inherit the <R> type from the Table<R> and bind it to the Select<R> type. 2. Explicitly reference all fields in subselects. This will be a bit more verbose. Cheers Lukas 2014-03-04 21:31 GMT+01:00 <[email protected]>: > Hi, > > I've been trying to figure out how I can get the field types from > sub-selects. > > Example (how I've managed to get stuff to compile and return what I want): > > Table<Record2<UInteger, Timestamp>> t1 = create.select(...).asTable(); > Table<Record2<UInteger, Timestamp>> t2 = create.select(...).asTable(); > > Table<Record> t3 = create.select(t1.fields()) > .from(t1) > .union(create.select(t2.fields()) > .from(t2) > ).asTable() > > > How can I get t3 to have a to have the type Table<Record2<UInteger, > Timestamp>>? > > > Thanks for any assistance, > Joshua > > -- > 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. > -- 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.
