Hi Markus sorry for being late, but I'm stuck in a heap of work...
2010/7/14 Markus <[email protected]>: > Hi Markus! > > This idea comes closer to what I was thinking about, yes. I'm just > wondering if this approach also works well together with the existing > configuration schema and the possibility to add config nodes for > differtent databases based on base-class types? Let's say I have 5 > tenant databases and one legacy database, and I have to access the > legacy database as well as the tenant's database within one scope, was > it possible to do that? Of course, analogous to how it is possible now to connect to more than one database. You can have for example the following database configs: <config>...</config> <config tenant="t1" type="TypeA">...</config> <config tenant="t2" type="TypeA">...</config> <config tenant="t3" type="TypeA">...</config> <config source="Logging">...</config> Now all types use the single default database, except those inheriting from TypeA and those which are marked [ActiveRecord(Source="Logging)] public class Log : ActiveRecordBase<Log> { } So, multiple databases can be used by base classes, evtl. interfaces and the source flag on the ActiveRecord-attribute. > What dou you think about the idea to keep the existing configuration > schema (one config per base-class type instead of one config per > tenant) but to have the possibility to inject the connection provider? No one prevents you from creating your own connection provider with the current version of AR/NH, but this will be much more difficult than using multiple configs. In conjuntion with the IDao<T> vision (see other thread here) I have, it would be possible to inject DAOs per type that choose add some tenant ID to all entities, so you can use transparent multitenancy in a single database. -Markus -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
