roydukkey / nhibernate-x-factories Goto Github PK
View Code? Open in Web Editor NEWNHibernate X-Factories allows you to merge all those .cfg.xml files into one.
License: MIT License
NHibernate X-Factories allows you to merge all those .cfg.xml files into one.
License: MIT License
Hi,
would like to use this from App.config (....exe.config) for a Windows Service Application. Have tried but do not get it working. I followed your wiki article "Configuration from Web.Config" with using App.config instead of Web.config. But it does not compile because NHibernate.Cfg.Configuration.Configure does not have a version with two String parameters. I'm using NHibernate 3.4.0.0.
Thank you very much for any help, Martin
It appears that Mono handles XML a little differently and causes exception to be thrown.
NHibernate.XFactories
Removing from configuration schema a dropped property after session opening port from hibernate.
The provided source has the following block:
//XmlElement root = doc.DocumentElement;
XmlNode nhibernateNode = root.SelectSingleNode("descendant::nhibernate:hibernate-configuration", namespaceMgr);
In the case of the sample XML you provided, nhibernateNode
is null with the above query. Querying for the node directly from doc
, instead of doc.DocumentElement
does work.
XmlNode nhibernateNode = doc.SelectSingleNode("descendant::nhibernate:hibernate-configuration", namespaceMgr);
I need to access 2 sql dbs, one is MS SQL 2014,I named it ACDS and the 2nd is an old ms sql2000,i named it EF.
I put everything into ,the nhibernate.cfg.xml, run from my own pc,it works.
Then i publish the service code to an winserver 2008,it failed to access the EF db,the error message looks like:
An exception of type 'System.Data.SqlClient.SqlException' occurred in NHibernate.dll but was not handled in user code.
it says failed to locate the db server(provider: SQL Network Interfaces, error: 26).
But the ACDS db works fine at the same time.
Then i move back to my PC,and change the configuration as the [Configuration from Web.Config] told,this time it failed with same error (provider: SQL Network Interfaces, error: 26).
If i move the config data back to the nhibernate.cfg.xml file from the web.config,every thing works fine in my pc.
Version will update according to new releases nhibernate/nhibernate-core.
New minor and patch releases to nhibernate/nhibernate-core that don't contain changes that affect this project will not force a version bump.
The nhibernate-configuration-x-factories.xsd
throws warning to elements outside of the <hibernate-configuration-x-factories />
element.
Example:
The global element 'urn:nhibernate-configuration-2.2-x-factories:{...}' has already been declared.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.