That is a pretty good solution if I drop the FK.  I want to ensure no
corrupt data is allowed, assigning a lookup from one tenant to another
tenant's data, for instance.  While I can programmatically accomplish
most of that, I like the ultimate guarantor a relational db can be.

I am using a code emitter, so deciding on an appropriate pattern is an
essential first step and size is a little less significant.  Most of
the system will not be aware of the multi-tenancy.

Regards,
Kyle

On Apr 16, 5:30 pm, Craig van Nieuwkerk <[email protected]> wrote:
> For my multi-tenant app I added the extra Tenant ID column (or
> OrganisationId I called it) but I didn't add it to the primary key, it was
> just a foreign key to the Organisation table. Then I created some helper
> extension methods on top of QueryOver to automatically add it to any
> queries and security extension methods to make sure when they could only
> see their own data (if they changed the id in the url).
>
> It wasn't that hard, but if you have a large app already it could take a
> while to retro fit.
>
> Craig
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to