Thanks, this looks very promising.
I did try this but I can't get the abstract class to use the mapping, it's
still trying to pull the data from the main table rather than the view:
I tried it with RenderSchema - true and false, with or without the
MappedSchema, with only the input and no output -- none of the different
changes made a difference in the actual run.
I even did a static import of the Tables.PT and PT_A and used the
.getName() method for the values to make sure I wasn't mistyping anything.
jConfig = new org.jooq.impl.DefaultConfiguration();
jConfig.set(new
DefaultConnectionProvider(DBConnectionPool.getDBConnection()));
jConfig.set(new DefaultExecuteListenerProvider(new DBStatisticsPrinter()));
jConfig.set(SQLDialect.MYSQL);
jConfig.settings().withRenderSchema(Boolean.TRUE)
.withRenderMapping(new RenderMapping()
.withSchemata(new MappedSchema().withInput("T1").withOutput("T1")
.withTables(
new MappedTable()
.withInput("PT")
.withOutput("PT_T"))));
context = DSL.using(jConfig);
super.setContext(context);
Thank you.
On Thursday, November 21, 2013 8:24:52 PM UTC-5, Aram Mirzadeh wrote:
>
>
> Hi,
>
> I have multiple VIEWs that are based on a single table based on product
> type.
>
> TABLE
> TABLE_AAA
> TABLE_BBB
> etc.
>
> Since I have a single class that does all of my queries. How do pass in
> the table name which maybe one of the views to be used in the
> .from(dynamicTable)?
>
> Thanks.
>
--
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.