Hi Lucas, I don't understand when you say that once you join other table the specific table type would get lost. For example : - SELECT t.* FROM Table1 t => the result type is Table1 - SELECT t.* FROM Table1 t JOIN Table2 k ON t.id=k.tid => the result type is still Table1
Am I missing something ? Cheers, Aurélien On Saturday, November 16, 2013 12:03:45 PM UTC+1, Lukas Eder wrote: > > Hi Gérald, > > 2013/11/16 Gérald Quintana <[email protected] <javascript:>> > >> Hello, >> >> Actually, the question was: why can't I use joins when using selectFrom >> statement? >> > > Hmm, yes, I was going to explain that but somehow I forgot... > > The idea is simple (although debatable). The idea behind selectFrom() is > to provide jOOQ with a clearly defined record type, which may be a more > specific type than for instance Record2<Integer, String>. Once you join > other tables, that specific table type would get lost (i.e. denormalised). > Since selectFrom() offers no way to redefine the projection (SELECT > clause), the result would inevitably be the type-unsafe Record. > > There's certainly room for API improvement in that area. I'm open to > suggestions. > > At first, I thought that "selectFrom(SOURCE).fetchInto(TARGET)" meant >> "insert into TARGET (...) select .. from SOURCE". >> > > Aha. No that would be insertInto(TARGET).select(...) > > Cheers > 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.
