Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 2.0
I am accessing multiple databases via nhibernate using single SessionFactory. I followed this post to do that :-http://forum.hibernate.org/viewtopic.php?t=962161
I can access multiple databases successfully but when I try to use schemaUpdate of hbm2ddl utility, Nhibernate generates CreateTable statement instead of alter table for the second database.
For Example:-
DB1 Tables: Products and Category
DB2 Table: Message
In Connectionstring I have specified that Nhibernate is connected to DB1
ConnectionString="Server=localhost\SQLExpress;initial catalog=nhibernate;database=DB1; Integrated security=SSPI"
When I change something in the mapping of Product or Category and call SchemaUpdate.Execute(), NHibernate generates alter table statement. But when I change something in Message mapping and call SchemaUpdate.Execute() it generates a create table statement.
Can anyone help me in this regard.
Thanks
Syed