You might want to ask for some advice on the nhibernate mailing
list<http://groups.google.com/group/nhusers>when it comes to dealing
with multiple session factories. The Fluent
NHibernate side of things should be relatively straightforward - you should
be able to execute Fluently.Configure multiple times, each time building a
different session factory. I'm not sure how many people have done this
before though so if you think you've encountered a bug, please give us a
shout.

On Sun, Dec 20, 2009 at 3:56 AM, Farina <[email protected]> wrote:

> Hi David, take a look into the SessionFactory from NHibernate.
> I guess you will have to create a SessionManager in order to control
> sessions to different databases.
>
> https://www.hibernate.org/363.html#A4
>
> Regards,
> André
>
> On 18 dez, 07:38, David Perfors <[email protected]> wrote:
> > Hello,
> >
> > I am working on a project that uses a large legacy database. The old
> > version of the software makes use of several Access databases. After
> > some years there came support for MsSql server. There came one
> > database in MsSql and multiple Access databases where moved there. The
> > table names got the prefix of the Access database name.
> > (AccessDb_TableName) except for one large database, that one could
> > keep it's old table names... Some of the database where never added to
> > the MsSql server.
> > We now have the situation where some of our clients use the Access
> > version of our software (they don't have MsSqlServer) and other are
> > using the SQL Server version, but we still have to support both of
> > them.
> > I am working on a project to create new software based on the old
> > software and I want to use NHibernate for this. Since mapping these
> > databases is difficult I decided to use fluent nhibernate, which makes
> > it a little bit easier.
> > But, I have no idea what my best options are.
> >
> > I guess it it will have to use multiple configurations and
> > sessionfactories, but how do I get the right sessionfactory for the
> > right functionality? and how do I get the right mapping in the
> > configuration?
> >
> > On the Mapping side I probably need to submap my mappings to specify
> > the right tablename and databasename since I don't think I can use a
> > constructor that gets the configuration from the software...
> >
> > Any suggestions?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Fluent NHibernate" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<fluent-nhibernate%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en.


Reply via email to