Hi,

I am planning to transform an existing piece of software using jOOQ to 
support multi-tenant data. As tenants share some data, multiple databases 
or schemas seem to make things very hard.

So next idea is to use a discriminator column (tenant_id) in tables that 
have tenant-dependent data.

I thought I could use VisitListener to rewrite queries to contain a 
where-clause limiting such queries into only one tenant (basically, add 
where tenant_id = ?).

Is this doable in theory? In practice?

To me, at least doable in theory seems correct as I'll get to visit all 
parts of the query.

But as I did not find anyone having done that, in practice seems less 
certain.

Is this a silly approach?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/59c1d6d3-0dcc-4a7e-94b1-37a7cf872d39n%40googlegroups.com.

Reply via email to