Hi Gérald,

2013/11/16 Gérald Quintana <[email protected]>

> 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.

Reply via email to