Hello, DSLContext.selectFrom() <http://www.jooq.org/javadoc/latest/org/jooq/DSLContext.html> is used to query tables only from a single database table. The only possible JOIN type in that case would be a semi-join using IN or EXISTS predicates. Either you resort to semi-joins, or you can use the "ordinary" SELECT syntax, selecting all required columns from the FILE table (e.g. through Table.fields() <http://www.jooq.org/javadoc/latest/org/jooq/TableLike.html#fields-->), and then coercing the resulting records to FileRecord or FilePojo using either Result.into(Table) <http://www.jooq.org/javadoc/latest/org/jooq/Result.html#into-org.jooq.Table-> (to produce FileRecord), or Result.into(Class) <http://www.jooq.org/javadoc/latest/org/jooq/Result.html#into-java.lang.Class-> (to produce FilePojos)
Hope this helps, Lukas 2014-09-05 0:31 GMT+02:00 <[email protected]>: > Hi, > > i have for example two tables.. one "file" table with a workspaceId as > foreign key. this workspaceID links to my "Workspace" Table and in my > Workspace Table has an accountID. > > jooq has created an FileRecord and a FilePojo is it possible to do a join > between these two tables and check if the accountId is for example 3 and > then return a FileRecor or a FilePojo object ? > > best regards > > -- > 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.
