<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: NHibernate &#8220;null identifier&#8221; error</title>
	<atom:link href="http://www.codewrecks.com/blog/index.php/2009/04/02/nhibernate-null-identifier-error/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codewrecks.com/blog/index.php/2009/04/02/nhibernate-null-identifier-error/</link>
	<description>Wrecks of code floating in the sea of Internet</description>
	<lastBuildDate>Wed, 28 Jul 2010 15:30:03 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: alkampfer</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/04/02/nhibernate-null-identifier-error/comment-page-1/#comment-2205</link>
		<dc:creator>alkampfer</dc:creator>
		<pubDate>Wed, 15 Apr 2009 09:53:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/04/02/nhibernate-null-identifier-error/#comment-2205</guid>
		<description>Well, the problem is the following, if Id is generated by the db with an identity column when you call Session.Save nhibernate needs to insert the data into the table to retrieve the id. If you set autoflush to none the data gets inserted in save. This does not means that you need to use &quot;assigned&quot; as id, you can simply use a guid and the standard guid generator, or you can use other generators supported in nhibernate.

Assigned means that &quot;you&quot; assign id to the entity thus nhibernate cannot use saveorupdate and other problems will arise.

alk.</description>
		<content:encoded><![CDATA[<p>Well, the problem is the following, if Id is generated by the db with an identity column when you call Session.Save nhibernate needs to insert the data into the table to retrieve the id. If you set autoflush to none the data gets inserted in save. This does not means that you need to use &#8220;assigned&#8221; as id, you can simply use a guid and the standard guid generator, or you can use other generators supported in nhibernate.</p>
<p>Assigned means that &#8220;you&#8221; assign id to the entity thus nhibernate cannot use saveorupdate and other problems will arise.</p>
<p>alk.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcus Mobley</title>
		<link>http://www.codewrecks.com/blog/index.php/2009/04/02/nhibernate-null-identifier-error/comment-page-1/#comment-2203</link>
		<dc:creator>Marcus Mobley</dc:creator>
		<pubDate>Tue, 14 Apr 2009 21:40:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.codewrecks.com/blog/index.php/2009/04/02/nhibernate-null-identifier-error/#comment-2203</guid>
		<description>&quot;Another good reason not to use identity with nhibernate.&quot;   Can you expand on this?  Everywhere I read I see people saying &quot;Assigned Id&#039;s are the spawn of the devil&quot; with regards to NHibernate.</description>
		<content:encoded><![CDATA[<p>&#8220;Another good reason not to use identity with nhibernate.&#8221;   Can you expand on this?  Everywhere I read I see people saying &#8220;Assigned Id&#8217;s are the spawn of the devil&#8221; with regards to NHibernate.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
