sure there is. - if you need your own parameters you should use your own section with your own section-name (for that reason .NET has some nice classes). - create your own section, implements your IConfigurationSectionHandler, your own IHibernateConfiguration, your own ISessionFactoryConfiguration, inherit from Configuration and, in some way, use DoConfigure(ISessionFactoryConfiguration factoryConfiguration) - add your properties by code using configuration.Properties
To chose a way try to ask yourself which is the reason to add the properties for your needs inside the configuration of another framework. On Sat, May 1, 2010 at 9:32 PM, Graham Bunce <[email protected]>wrote: > Hi, > > I'm trying to add custom properties to the hibernate.cfg file to > control additional behaviour that we have extended in NH. > Unfortunately the NH XSD forces the Configure() step to fail as it > doesn't recognise my configuration. > > I'd like to extend the configure class to, perhaps, intercept the > configuration and allow me to read the custom properties and strip > them out prior to NH using them, but the class doesn't provide > appropriate extension points to do so (i.e. I can't override the > "configure()" method). > > I thought about creating my own configure class that wraps the NH one, > reads the properties myself and manually add them to the NH configure > class, but it seems a bit hacky. > > Is there a cleaner solution? > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- Fabio Maulo -- You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en.
