<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Emad Alashi&#039;s Blog &#187; Enumeration</title>
	<atom:link href="http://www.emadashi.com/index.php/tag/enumeration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emadashi.com</link>
	<description></description>
	<lastBuildDate>Sun, 15 Jan 2012 10:05:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mapping Enumeration of type int in NHibernate</title>
		<link>http://www.emadashi.com/index.php/2008/08/mapping-enumeration-of-type-int-in-nhibernate/</link>
		<comments>http://www.emadashi.com/index.php/2008/08/mapping-enumeration-of-type-int-in-nhibernate/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 07:45:38 +0000</pubDate>
		<dc:creator>Emad Alashi</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[NHibernate]]></category>
		<category><![CDATA[Enumeration]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[Mapping]]></category>

		<guid isPermaLink="false">http://eashi.wordpress.com/?p=74</guid>
		<description><![CDATA[I wanted to map an integer enumeration type in NHibernate, I googled &#8220;mapping enumeration in NHibernate&#8221; and the best explanation was of Jeremy Miller in his post here.
But as it appears (and according to my understanding) that the enumeration type should be mapped to a database column of characters type (varchar, char,&#8230;etc).
What if the database [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to map an integer enumeration type in NHibernate, I googled &#8220;mapping enumeration in NHibernate&#8221; and the best explanation was of Jeremy Miller in his post <a href="http://codebetter.com/blogs/jeremy.miller/archive/2006/02/20/138732.aspx">here</a>.</p>
<p>But as it appears (and according to my understanding) that the enumeration type should be mapped to a database column of characters type (varchar, char,&#8230;etc).<br />
What if the database column was int? well&#8230;do exactly like what jeremy did except simply use &#8220;<strong>NHibernate.Type.PersistentEnumType</strong>&#8221; instead of &#8220;<strong>NHibernate.Type.EnumStringType</strong>&#8220;.</p>
<p>The sole purpose of this post is that I didn&#8217;t find this solution fast enough on google, so I hope it helps others faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.emadashi.com/index.php/2008/08/mapping-enumeration-of-type-int-in-nhibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

