Hi Lukas, thank you for your quick reply, I will take a look into it. Probably it is what I need.
Have a nice weekend :) Jorge Eduardo Flórez On Friday, June 1, 2018 at 9:21:14 AM UTC-5, Lukas Eder wrote: > > Hi Jorge, > > Thanks for your message and for your nice words. > > You can use the runtime schema/table mapping feature for this purpose: > > https://www.jooq.org/doc/latest/manual/sql-building/dsl-context/custom-settings/settings-render-mapping > > Essentially, you'll need one DSLContext / Configuration / Settings per > user where you configure the mapping between "document" and > "document_user_x", and you're done. All the queries you run through jOOQ > (or the ones generated by jOOQ through CRUD methods, etc.) will now point > to the new table. This won't work for plain SQL queries, of course. > > Hope this helps, > Lukas > > 2018-06-01 15:42 GMT+02:00 jorgeeflorez <[email protected] > <javascript:>>: > >> Hello, >> >> I have used JOOQ with no problems in other projects. I think it is a >> great tool. >> >> I am trying to do the following: (maybe I am crazy for thinking this :) ) >> >> I have a table, lets say "document", I define some columns and generate >> code using JOOQ (table and record classes). >> >> In runtime, I will generate one table for each user, they are exact >> copies of "document" (except for the table name). I would like to know if >> it is possible to make the record object to "point" to a table different >> than the used to generate code. I mean, using the record object to >> represent one record (and CRUD) in one of the dynamic tables. >> >> What I am trying is maybe impossible. Any guidance about this is >> appreciated. >> >> Best Regards. >> >> Jorge Eduardo Flórez >> >> -- >> 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] <javascript:>. >> 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.
