- n2item
- n2ContentItem etc.
It's dead simple to do this. If you had ClientA and ClientB you would want your tables to be something like:
- ClientA_Item
- ClientA_ContentItem and
- ClientB_Item
- ClientB_ContentItem
<!-- Other flavours: SqlServer2005, SqlServer2000, MySql, SqLite, SqlCe, Firebird -->
<database connectionStringName="N2CMS" flavour="AutoDetect" caching="true" cacheProviderClass="NHibernate.Caches.SysCache2.SysCacheProvider, NHibernate.Caches.SysCache2" tablePrefix="TheNameOfYourClient_">
<hibernateProperties>
<add name="hbm2ddl.keywords" value="none" />
</hibernateProperties>
</database>
Voila! You can now run several sites on one database!
Note: I always add a "_" after the name of the client as it makes the tables in the database look a little neater!
Did you mean..
ReplyDeleteClientA_Item
ClientA_ContentItem and
ClientB_Item
ClientB_ContentItem
..?
Yes - I've updated the article :) Thanks for pointing that out.
ReplyDelete