It works for sure, I've added an unit test to trunk to check this. Please make sure that you also initialize the abstract base class with ARStarter!
-Markus 2008/11/22 Ricardo Borges <[EMAIL PROTECTED]> > > Yeah! I would be happy if it was... I've read it... but, I think it is > wrong... :( > > Maybe he wants to say: "However, if you will use only one database, it > is not necessary to extend ActiveRecordBase...." > > It's seems (source code) that ActiveRecordMediador uses static methods > from ActiveRecordBase, and ActiveRecordBase can select the > SessionFactory by the (root) type of an entity model.... it is the > only way to use differents session factories, you are right, as you > said before... > > thanks again > > Ricardo > > > > 2008/11/22 Markus Zywitza <[EMAIL PROTECTED]>: > > You're looking for this page: > > > http://www.castleproject.org/activerecord/documentation/trunk/advanced/accessingmoredbs.html > > > > It reads: > > > > However, it is not necessary to extend ActiveRecordBase. When > ActiveRecord > > is used without base types (using ActiveRecordMediator), there is no gain > > from extending ActiveRecordBase, and inheriting from it can be safely > > omitted. > > > > -Markus > > 2008/11/21 Ricardo Borges <[EMAIL PROTECTED]> > >> > >> Markus, yes, the only documentarion I found was: > >> > >> > >> > http://www.castleproject.org/activerecord/documentation/trunk/advanced/mediator.html > >> > >> Are there others ? > >> > >> In the trunk source I found a multiple database test case, but it is > >> using ActiveRecordBase inheritance.... I don't want do that... > >> > >> > >> > >> > >> 2008/11/21 Markus Zywitza <[EMAIL PROTECTED]>: > >> > Did you read the documentation article? > >> > > >> > You have two possibilities: > >> > > >> > Declaring multiple configs with baseclasses. You can then simply use > >> > ActiveRecordMediator<MyAltenativeDBClass>.Save(entity); > >> > You could even use > >> > ActiveRecordMediator.Save(entity); > >> > AR determines the required SessionFactory by querying entity's type. > >> > > >> > Using DifferentDatabaseScope when you need to change the connection > >> > while > >> > using the same SessionFactory. > >> > > >> > -Markus > >> > > >> > 2008/11/21 Ricardo Borges <[EMAIL PROTECTED]> > >> >> > >> >> Hi, > >> >> > >> >> How can we use ActiveRecordMediator<T> for multiple databases > >> >> (multiple session factories) ? > >> >> > >> >> thanks > >> >> >> > >> > > >> >> > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
