<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Tags/Mapping on Emad Alashi</title>
    <link>https://emadashi.com/tags/mapping/</link>
    <description>Recent content in Tags/Mapping on Emad Alashi</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 19 Aug 2008 07:45:38 +0000</lastBuildDate>
    <atom:link href="https://emadashi.com/tags/mapping/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Mapping Enumeration of type int in NHibernate</title>
      <link>https://emadashi.com/2008/08/mapping-enumeration-of-type-int-in-nhibernate/</link>
      <pubDate>Tue, 19 Aug 2008 07:45:38 +0000</pubDate>
      <guid>https://emadashi.com/2008/08/mapping-enumeration-of-type-int-in-nhibernate/</guid>
      <description>&lt;p&gt;I wanted to map an integer enumeration type in NHibernate, I googled “mapping enumeration in NHibernate” and the best explanation was of Jeremy Miller in his post &lt;a href=&#34;http://codebetter.com/blogs/jeremy.miller/archive/2006/02/20/138732.aspx&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;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,…etc).&lt;br&gt;
What if the database column was int? well…do exactly like what jeremy did except simply use “&lt;strong&gt;NHibernate.Type.PersistentEnumType&lt;/strong&gt;” instead of “&lt;strong&gt;NHibernate.Type.EnumStringType&lt;/strong&gt;“.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
