You're creating databases at runtime? Or creating the schema the first time?
On Thu, Jul 30, 2009 at 8:17 PM, ComradeF <[email protected]> wrote: > > How does one pull that off if new databases are created during > runtime? > > What I'm seeing here is > > m_oSessionFactory = Fluently.Configure() > .Database > (MsSqlConfiguration.MsSql2005.ConnectionString(c => c > .Server(m_strServer) > .Username(m_strUserID) > .Password(m_strPassword) > .Database(Name))) > .Mappings(m => > > > etc... > > Do I not need to specify the connection at this time? > > > > > On Jul 30, 1:28 pm, James Gregory <[email protected]> wrote: > > You should really only create a session factory once, generally on > > application load. If you need more than one, they should still all be > > created at the start. > > > > On Thu, Jul 30, 2009 at 7:22 PM, ComradeF <[email protected]> wrote: > > > > > "Id". Though I'm looking at my code now and I'm beginning to think > > > this has to do with thread abortions that occur either while > > > NHibernate is doing something, or while FNH is mapping. My project > > > uses a lot of databases, and to connect to each one, have to call > > > Fluenty.Configure() and provide the connection string, the > > > automappings... you know the drill. > > > > > So in other words, it's probably just a result of my usage scenario -- > > > which is probably not ideal. > > > > > Maybe I can shift this to another question as well, then... is there a > > > better way to handle that? > > > > > Suppose I've got a schema that is used in three databases. Same > > > schema. Will I need to call Fluently.Configure() from the beginning > > > each time I want to use one? Or is there some way to retain the > > > mappings in memory and just make new session factories? Hopefully that > > > made sense... > > > > > On Jul 30, 1:02 pm, James Gregory <[email protected]> wrote: > > > > Sounds like you don't have an Id mapped. What's your Id property > called? > > > > > > On Thu, Jul 30, 2009 at 6:57 PM, ComradeF <[email protected]> > wrote: > > > > > > > Using release 536 and log4net, I'm seeing this error. I'm using > > > > > AutoMappings. > > > > > > > (XmlDocument)(3,6): XML validation error: The element 'class' in > > > > > namespace 'urn:nhibernate-mapping-2.2' has invalid child element > > > > > 'property' in namespace 'urn:nhibernate-mapping-2.2'. List of > possible > > > > > elements expected: 'meta, subselect, cache, synchronize, comment, > > > > > tuplizer, id, composite-id' in namespace > 'urn:nhibernate-mapping-2.2'. > > > > > NHibernateMappingException: (XmlDocument)(3,6): XmlValidation > error: > > > > > The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has > > > > > invalid child element 'property' in namespace 'urn:nhibernate- > > > > > mapping-2.2'. List of possible elements expected: 'meta, subselect, > > > > > cache, synchronize, comment, tuplizer, id, composite-id' in > namespace > > > > > 'urn:nhibernate-mapping-2.2'. ---> > > > > > System.Xml.Schema.XmlSchemaValidationExpectation: The element > 'class' > > > > > in namespace 'urn:nhibernate-mapping-2.2' has invalid child element > > > > > 'property' in namespace 'urn:nhibernate-mapping-2.2'. List of > possible > > > > > elements expected: 'meta, subselect, cache, synchronize, comment, > > > > > tuplizer, id, composite-id' in namespace > 'urn:nhibernate-mapping-2.2'. > > > > > --- End of inner exception stack trace --- > > > > > > > What other information would help? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
