<p>What kinds of considerations are there for migrating an application from <strong>NHibernate</strong> 1.2 to 2.0? What are breaking changes vs. recommended changes? </p>

<p>Are there mapping issues?</p>

[{'answer_id': 27323, 'author': 'Matt Hinze', 'author_id': 2676, 'author_profile': 'https://Stackoverflow.com/users/2676', 'pm_score': 4, 'selected': True, 'text': '<p><a href="http://forum.hibernate.org/viewtopic.php?t=985289" rel="noreferrer">Breaking changes in NHibernate 2.0</a></p>\n\n<p><strong>If you have good test coverage it\'s busywork.</strong></p>\n\n<p>Edit: We upgraded this morning.  There is nothing major.  You have to Flush() the session after you delete.  The Expression namespace got renamed to Criterion.  All these are covered in the link above.  Mappings need no change.  It\'s quite transparent.  Oh, and transactions <em>everywhere</em>, but you were probably doing that already.</p>\n\n<p>By the way, here\'s an interesting look at the changes: <a href="http://codebetter.com/blogs/patricksmacchia/archive/2008/08/26/nhibernate-2-0-changes-overview.aspx" rel="noreferrer">http://codebetter.com/blogs/patricksmacchia/archive/2008/08/26/nhibernate-2-0-changes-overview.aspx</a></p>\n'}, {'answer_id': 28693, 'author': 'Chris Conway', 'author_id': 2849, 'author_profile': 'https://Stackoverflow.com/users/2849', 'pm_score': 2, 'selected': False, 'text': '<p>I found the answer here:</p>\n\n<p><a href="http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/" rel="nofollow noreferrer">http://blog.domaindotnet.com/2008/08/24/nhibernate-20-gold-released-must-wait-for-linq-to-nhibernate/</a></p>\n\n<h1>gold release 2.0.0.GA</h1>\n\n<h2>BREAKING CHANGES from NH1.2.1GA to NH2.0.0</h2>\n\n<ul>\n<li>\n<h2>Infrastructure</h2>\n\n<ul>\n<li>.NET 1.1 is no longer supported</li>\n<li>Nullables.NHibernate is no longer supported (use nullable types of .NET 2.0)</li>\n<li>Contrib moved. New Location\n<ul>\n<li><a href="http://sourceforge.net/projects/nhcontrib" rel="nofollow noreferrer">http://sourceforge.net/projects/nhcontrib</a></li>\n</ul>\n</li>\n</ul>\n</li>\n<li>\n<h2>Compile time</h2>\n<ul>\n\n<li>NHibernate.Expression namespace was renamed to NHibernate.Criterion</li>\n<li>IInterceptor have additional methods. (IsUnsaved was renamed IsTransient)</li>\n<li>INamingStrategy</li>\n<li>IType</li>\n<li>IEntityPersister</li>\n<li>IVersionType</li>\n<li>IBatcher</li>\n<li>IUserCollectionType</li>\n<li>IEnhancedUserType</li>\n\n<li>IPropertyAccessor</li>\n<li>ValueTypeType renamed to PrimitiveType</li>\n</ul>\n</li>\n<li>\n<h2>Possible Breaking Changes for external frameworks</h2>\n</li>\n</ul>\n\n<ul>\n<li>Various classes were moved between namespaces</li>\n<li>Various classes have been renamed (to match Hibernate 3.2 names)</li>\n<li>ISession interface have additional methods</li>\n\n<li>ICacheProvider</li>\n<li>ICriterion</li>\n<li>CriteriaQueryTranslator</li>\n</ul>\n\n<p><li></p>\n\n<h2>Initialization time</h2>\n\n<p></li></p>\n\n<ul>\n<li>&lt;nhibernate&gt; section, in App.config, is no longer supported and will be ignored. Configuration schema for configuration file and App.config is now identical, and the App.config section name is: &lt;hibernate-configuration&gt;</li>\n\n<li>&lt;hibernate-configuration&gt; have a different schema and all properties names are cheked</li>\n<li>configuration properties are no longer prefixed by “hibernate.”, if before you would specify “hibernate.dialect”, now you specify just “dialect”</li>\n<li>All named queries will be validated at initialization time, an exception will be thrown if any is not valid (can be disabled if needed)</li>\n<li>Stricter checks for proxying classes (all public methods must be virtual)</li>\n</ul>\n\n<p><li></p>\n\n<h2>Run time</h2>\n\n<ul>\n<li>SaveOrUpdateCopy() returns a new instance of the entity without changing the original</li>\n\n<li>AutoFlush will not occur outside a transaction - Database transactions are never optional, all communication with the database must occur inside a transaction, whatever you read or write data.</li>\n<li>NHibernate will return long for count(*) queries on SQL Server</li>\n<li>&lt;formula&gt; must contain parenthesis when needed</li>\n<li>These HQL function names may cause conflict in your HQL reserved names are:\n<ul>\n<li>substring</li>\n<li>locate</li>\n<li>trim</li>\n<li>length</li>\n\n<li>bit_length</li>\n<li>coalesce</li>\n<li>nullif</li>\n<li>abs</li>\n<li>mod</li>\n<li>sqrt</li>\n<li>upper</li>\n<li>lower</li>\n<li>cast</li>\n\n<li>extract</li>\n<li>concat</li>\n<li>current_timestamp</li>\n<li>sysdate</li>\n<li>second</li>\n<li>minute</li>\n<li>hour</li>\n<li>day</li>\n<li>month</li>\n\n<li>year</li>\n<li>str</li>\n</ul>\n</li>\n<li>&lt;any&gt; when meta-type=”class” the persistent type is a string containing the Class.FullName\n<ul>\n<li>In order to set a parameter in a query you must use SetParameter(”paraName”, typeof(YourClass).FullName, NHibernateUtil.ClassMetaType)</li>\n</ul>\n</li>\n</ul>\n\n<p></li>\n<li></p>\n\n<h2>Mapping</h2>\n\n<p></li>\n\n<li>&lt;any&gt; : default meta-type is “string” (was “class”)</li></p>\n'}]
['https://Stackoverflow.com/questions/27243', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2849/']