How to deal with multi-tenancy using multiple schemas ?

28 views
Skip to first unread message

Cristiano

unread,
Feb 10, 2020, 9:31:32 AM2/10/20
to jOOQ User Group
Hello all,

I've started a POC for a new backend application using java+postgresql. We would like to experiment to have one common schema and one schema for every different customer in the database.

Have Jooq's a support this kind of approach ?  if yes, could you point me to any doc or example ?

many thanks,

Cristiano

Cristiano

unread,
Feb 10, 2020, 9:35:49 AM2/10/20
to jOOQ User Group
I forgot to say that the tenant will be identified by the token being sent by the web/mobile client app via Rest request.
Also every tenant's schema is planned to be identical.

Lukas Eder

unread,
Feb 10, 2020, 10:35:41 AM2/10/20
to jOOQ User Group
Hi Cristiano,

Please have a look at the runtime schema mapping feature:

Thanks,
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/99f88f7c-2bfb-49a2-a375-787e40f5e20a%40googlegroups.com.

Cristiano

unread,
Feb 17, 2020, 12:02:25 PM2/17/20
to jOOQ User Group
Hi Lukas thanks for the info.  I was able to generate my schemas properly.

But I'm having a problem with some column types. In some tables I have column using `pg_catalog.point`.

I'm using a non-jdbc postgres driver and I'm not sure how to proceed in order to use its provided `io.vertx.pgclient.data.Point` type with JOOQ. 

Must I create a binding or a converter or other approach ?

thanks

On Monday, February 10, 2020 at 12:35:41 PM UTC-3, Lukas Eder wrote:
Hi Cristiano,

Please have a look at the runtime schema mapping feature:

Thanks,
Lukas 

On Mon, Feb 10, 2020 at 3:35 PM Cristiano <cvga...@gmail.com> wrote:
I forgot to say that the tenant will be identified by the token being sent by the web/mobile client app via Rest request.
Also every tenant's schema is planned to be identical.



On Monday, February 10, 2020 at 11:31:32 AM UTC-3, Cristiano wrote:
Hello all,

I've started a POC for a new backend application using java+postgresql. We would like to experiment to have one common schema and one schema for every different customer in the database.

Have Jooq's a support this kind of approach ?  if yes, could you point me to any doc or example ?

many thanks,

Cristiano

--
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 jooq...@googlegroups.com.

Lukas Eder

unread,
Feb 21, 2020, 7:56:32 AM2/21/20
to jOOQ User Group
Hi Cristiano,

What are the problems you're running into?

Thanks,
Lukas

To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/01913d2b-b8bc-4f6a-8a80-9b4ee1303a5d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages