From: <pa...@us...> - 2011-03-28 04:39:55
|
Revision: 5561 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5561&view=rev Author: patearl Date: 2011-03-28 04:39:49 +0000 (Mon, 28 Mar 2011) Log Message: ----------- Revert recent changes to SettingsFactory. There may be external dependencies on the behavior I was changing. The default property handling needs more thought. Modified Paths: -------------- trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs Modified: trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs =================================================================== --- trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs 2011-03-28 03:47:26 UTC (rev 5560) +++ trunk/nhibernate/src/NHibernate/Cfg/SettingsFactory.cs 2011-03-28 04:39:49 UTC (rev 5561) @@ -29,15 +29,28 @@ { Settings settings = new Settings(); + Dialect.Dialect dialect; try { - settings.Dialect = Dialect.Dialect.GetDialect(properties); + dialect = Dialect.Dialect.GetDialect(properties); + Dictionary<string, string> temp = new Dictionary<string, string>(); + + foreach (KeyValuePair<string, string> de in dialect.DefaultProperties) + { + temp[de.Key] = de.Value; + } + foreach (KeyValuePair<string, string> de in properties) + { + temp[de.Key] = de.Value; + } + properties = temp; } catch (HibernateException he) { log.Warn("No dialect set - using GenericDialect: " + he.Message); - settings.Dialect = new GenericDialect(); + dialect = new GenericDialect(); } + settings.Dialect = dialect; settings.LinqToHqlGeneratorsRegistry = LinqToHqlGeneratorsRegistryFactory.CreateGeneratorsRegistry(properties); @@ -46,7 +59,7 @@ ISQLExceptionConverter sqlExceptionConverter; try { - sqlExceptionConverter = SQLExceptionConverterFactory.BuildSQLExceptionConverter(settings.Dialect, properties); + sqlExceptionConverter = SQLExceptionConverterFactory.BuildSQLExceptionConverter(dialect, properties); } catch (HibernateException) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |