<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Felice Pollano Blog - NHModeller</title>
    <link>http://www.felicepollano.com/</link>
    <description>The official Fatica Labs Blog!</description>
    <language>en-us</language>
    <copyright>Felice Pollano</copyright>
    <lastBuildDate>Mon, 21 Jun 2010 07:03:01 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>felice@felicepollano.com</managingEditor>
    <webMaster>felice@felicepollano.com</webMaster>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=bb5ee172-8c9c-49f7-8329-18831614e4d4</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,bb5ee172-8c9c-49f7-8329-18831614e4d4.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,bb5ee172-8c9c-49f7-8329-18831614e4d4.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=bb5ee172-8c9c-49f7-8329-18831614e4d4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well, since no feedback from the users, I decided to abandon the project <a href="http://www.felicepollano.com/CategoryView,category,NHModeller.aspx" target="_blank">NHModeller</a>.
It was an attempt to create a commercial tool for NH, without any interesting returns.
If someone is interested to have the source and continue the project please <a href="mailto://felice@:____remove____felicepollano.com" target="_blank">contact
me</a>. The project is now replaced by the new <a href="http://www.felicepollano.com/CategoryView,category,NHWorkBench.aspx" target="_blank">NHibernate
Workbench</a>, that is open source.
</p>
        <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=bb5ee172-8c9c-49f7-8329-18831614e4d4" />
      </body>
      <title>Where is NHModeller ?</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,bb5ee172-8c9c-49f7-8329-18831614e4d4.aspx</guid>
      <link>http://www.felicepollano.com/2010/06/21/WhereIsNHModeller.aspx</link>
      <pubDate>Mon, 21 Jun 2010 07:03:01 GMT</pubDate>
      <description>&lt;p&gt;
Well, since no feedback from the users, I decided to abandon the project &lt;a href="http://www.felicepollano.com/CategoryView,category,NHModeller.aspx" target="_blank"&gt;NHModeller&lt;/a&gt;.
It was an attempt to create a commercial tool for NH, without any interesting returns.
If someone is interested to have the source and continue the project please &lt;a href="mailto://felice@:____remove____felicepollano.com" target="_blank"&gt;contact
me&lt;/a&gt;. The project is now replaced by the new &lt;a href="http://www.felicepollano.com/CategoryView,category,NHWorkBench.aspx" target="_blank"&gt;NHibernate
Workbench&lt;/a&gt;, that is open source.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=bb5ee172-8c9c-49f7-8329-18831614e4d4" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,bb5ee172-8c9c-49f7-8329-18831614e4d4.aspx</comments>
      <category>Code GEneration</category>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=3efa5975-21ce-4391-b6aa-36c0381e5436</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,3efa5975-21ce-4391-b6aa-36c0381e5436.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,3efa5975-21ce-4391-b6aa-36c0381e5436.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=3efa5975-21ce-4391-b6aa-36c0381e5436</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Microsoft released the <a href="http://go.microsoft.com/?linkid=9648442" target="_blank">Oslo
May CTP</a>, so I'm porting <a href="http://nhmodeller.selfip.com">NHModeller</a> to
these new bits. 
</p>
        <p>
Porting the conole version was easy, just some error with the "null" in
the AST graph, but nothing difficult. Fortunatelly NHModeller has a suite of about
100 test that really helped to catch all the problems. 
</p>
        <p>
The intellipad plugin is still work in progress,but finally I have something closed
to the end: 
</p>
        <p>
  
</p>
        <p>
          <img src="http://www.felicepollano.com/public/3a1e9264-93d7-492a-8128-e6988adc17ba.png" alt="" />
        </p>
        <p>
The refactory was big, but the new plugin is simpler in code. The good news is that
now is very easy to create a custom DSL editor, with squiggles and highligting. May
be I will post an How to in the near future. 
</p>
        <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=3efa5975-21ce-4391-b6aa-36c0381e5436" />
      </body>
      <title>Moving NHModeller to the Oslo May Ctp</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,3efa5975-21ce-4391-b6aa-36c0381e5436.aspx</guid>
      <link>http://www.felicepollano.com/2009/05/31/MovingNHModellerToTheOsloMayCtp.aspx</link>
      <pubDate>Sun, 31 May 2009 11:23:00 GMT</pubDate>
      <description>&lt;p&gt;
Microsoft released the &lt;a href="http://go.microsoft.com/?linkid=9648442" target="_blank"&gt;Oslo
May CTP&lt;/a&gt;, so I&amp;#39;m porting &lt;a href="http://nhmodeller.selfip.com"&gt;NHModeller&lt;/a&gt; to
these new bits. 
&lt;/p&gt;
&lt;p&gt;
Porting the conole version was easy, just some error with the &amp;quot;null&amp;quot; in
the AST graph, but nothing difficult. Fortunatelly NHModeller has a suite of about
100 test that really helped to catch all the problems. 
&lt;/p&gt;
&lt;p&gt;
The intellipad plugin is still work in progress,but finally I have something closed
to the end: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/3a1e9264-93d7-492a-8128-e6988adc17ba.png" alt="" /&gt; 
&lt;/p&gt;
&lt;p&gt;
The refactory was big, but the new plugin is simpler in code. The good news is that
now is very easy to create a custom DSL editor, with squiggles and highligting. May
be I will post an How to in the near future. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=3efa5975-21ce-4391-b6aa-36c0381e5436" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,3efa5975-21ce-4391-b6aa-36c0381e5436.aspx</comments>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <a href="http://nhmodeller.selfip.com/">http://nhmodeller.selfip.com</a>
        <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be" />
      </body>
      <title>NHModeller has an official home..</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be.aspx</guid>
      <link>http://www.felicepollano.com/2009/05/18/NHModellerHasAnOfficialHome.aspx</link>
      <pubDate>Mon, 18 May 2009 07:21:00 GMT</pubDate>
      <description>&lt;a href="http://nhmodeller.selfip.com/"&gt;http://nhmodeller.selfip.com&lt;/a&gt; &lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,1e6c24eb-f6e3-45d5-9917-6aa1d38cc8be.aspx</comments>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=2fce1f43-90e4-4671-ba8f-03942f1168b1</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,2fce1f43-90e4-4671-ba8f-03942f1168b1.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,2fce1f43-90e4-4671-ba8f-03942f1168b1.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=2fce1f43-90e4-4671-ba8f-03942f1168b1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
When an field name conflict with some database dialect keywords, NHibernate offer
a syntax in the mapping to escape the identifier so that the mapping can behave properly:
quote the identifier with the <strong>"`"</strong> sign. 
</p>
        <p>
Unfortunately the dialect implementer is not obliged to espose a list of keywords
that needs to be escaped, so I decided to put something in the NHModeller syntax to
achieve the same results. 
</p>
        <p>
This is the sample entity: 
</p>
        <p>
  
</p>
        <pre>
          <font face="courier new,courier" size="2">NHModel{ Entity From { @Select:int
@Count:int Another:string(30) } in @From }</font>
        </pre>
        <pre>
The sign @ forces the correct escape generation in the mapping:
</pre>
        <pre>
 
</pre>
        <pre>
          <font face="courier new,courier" size="2"> &lt;?xml version='1.0'
?&gt; &lt;hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="MyTest"
namespace="MyTest.Entities"&gt; &lt;class name="From" table=<strong>"`From`"</strong>&gt;
&lt;id name="Id" column="Id" access="field.camelcase-underscore"&gt;
&lt;generator class="native" /&gt; &lt;/id&gt; &lt;property name="Select"
column="<strong>`Select`</strong>" type="System.Int32" not-null="true"
/&gt; &lt;property name="Count" column="<strong>`Count`</strong>"
type="System.Int32" not-null="true" /&gt; &lt;property name="Another"
column="Another" type="String" not-null="true" length="30"
/&gt; &lt;/class&gt; &lt;/hibernate-mapping&gt;</font>
        </pre>
        <pre>
          <font size="2">and will issue the correct db script ( ie MsSql2005 ):</font>
        </pre>
        <pre>
 
</pre>
        <pre>
 
</pre>
        <pre>
          <font face="courier new,courier" size="2">if exists (select * from dbo.sysobjects
where id = object_id(N'[From]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1) drop table <strong>[From]</strong>; create table <strong>[From]</strong> ( Id
INT IDENTITY NOT NULL, <strong>[Select]</strong> INT not null, <strong>[Count]</strong> INT
not null, Another NVARCHAR(30) not null, primary key (Id) );</font>   </pre>
        <pre>
 
</pre>
        <p>
  
</p>
        <pre>
        </pre>
        <p>
  
</p>
        <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=2fce1f43-90e4-4671-ba8f-03942f1168b1" />
      </body>
      <title>NHModeller - Keywords Name as Field Names</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,2fce1f43-90e4-4671-ba8f-03942f1168b1.aspx</guid>
      <link>http://www.felicepollano.com/2009/05/01/NHModellerKeywordsNameAsFieldNames.aspx</link>
      <pubDate>Fri, 01 May 2009 16:13:00 GMT</pubDate>
      <description>&lt;p&gt;
When an field name conflict with some database dialect keywords, NHibernate offer
a syntax in the mapping to escape the identifier so that the mapping can behave properly:
quote the identifier with the &lt;strong&gt;&amp;quot;`&amp;quot;&lt;/strong&gt; sign. 
&lt;/p&gt;
&lt;p&gt;
Unfortunately the dialect implementer is not obliged to espose a list of keywords
that needs to be escaped, so I decided to put something in the NHModeller syntax to
achieve the same results. 
&lt;/p&gt;
&lt;p&gt;
This is the sample entity: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;pre&gt;
&lt;font face="courier new,courier" size="2"&gt;NHModel{ Entity From { @Select:int
@Count:int Another:string(30) } in @From }&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;
The sign @ forces the correct escape generation in the mapping:
&lt;/pre&gt;
&lt;pre&gt;
&amp;nbsp;
&lt;/pre&gt;
&lt;pre&gt;
&lt;font face="courier new,courier" size="2"&gt;&amp;nbsp;&amp;lt;?xml version=&amp;#39;1.0&amp;#39;
?&amp;gt; &amp;lt;hibernate-mapping xmlns=&amp;quot;urn:nhibernate-mapping-2.2&amp;quot; assembly=&amp;quot;MyTest&amp;quot;
namespace=&amp;quot;MyTest.Entities&amp;quot;&amp;gt; &amp;lt;class name=&amp;quot;From&amp;quot; table=&lt;strong&gt;&amp;quot;`From`&amp;quot;&lt;/strong&gt;&amp;gt;
&amp;lt;id name=&amp;quot;Id&amp;quot; column=&amp;quot;Id&amp;quot; access=&amp;quot;field.camelcase-underscore&amp;quot;&amp;gt;
&amp;lt;generator class=&amp;quot;native&amp;quot; /&amp;gt; &amp;lt;/id&amp;gt; &amp;lt;property name=&amp;quot;Select&amp;quot;
column=&amp;quot;&lt;strong&gt;`Select`&lt;/strong&gt;&amp;quot; type=&amp;quot;System.Int32&amp;quot; not-null=&amp;quot;true&amp;quot;
/&amp;gt; &amp;lt;property name=&amp;quot;Count&amp;quot; column=&amp;quot;&lt;strong&gt;`Count`&lt;/strong&gt;&amp;quot;
type=&amp;quot;System.Int32&amp;quot; not-null=&amp;quot;true&amp;quot; /&amp;gt; &amp;lt;property name=&amp;quot;Another&amp;quot;
column=&amp;quot;Another&amp;quot; type=&amp;quot;String&amp;quot; not-null=&amp;quot;true&amp;quot; length=&amp;quot;30&amp;quot;
/&amp;gt; &amp;lt;/class&amp;gt; &amp;lt;/hibernate-mapping&amp;gt;&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;
&lt;font size="2"&gt;and will issue the correct db script ( ie MsSql2005 ):&lt;/font&gt; &lt;/pre&gt;
&lt;pre&gt;
&amp;nbsp;
&lt;/pre&gt;
&lt;pre&gt;
&amp;nbsp;
&lt;/pre&gt;
&lt;pre&gt;
&lt;font face="courier new,courier" size="2"&gt;if exists (select * from dbo.sysobjects
where id = object_id(N&amp;#39;[From]&amp;#39;) and OBJECTPROPERTY(id, N&amp;#39;IsUserTable&amp;#39;)
= 1) drop table &lt;strong&gt;[From]&lt;/strong&gt;; create table &lt;strong&gt;[From]&lt;/strong&gt; ( Id
INT IDENTITY NOT NULL, &lt;strong&gt;[Select]&lt;/strong&gt; INT not null, &lt;strong&gt;[Count]&lt;/strong&gt; INT
not null, Another NVARCHAR(30) not null, primary key (Id) );&lt;/font&gt; &amp;nbsp; &lt;/pre&gt;
&lt;pre&gt;
&amp;nbsp;
&lt;/pre&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;pre&gt;
	
&lt;/pre&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=2fce1f43-90e4-4671-ba8f-03942f1168b1" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,2fce1f43-90e4-4671-ba8f-03942f1168b1.aspx</comments>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=f33ba153-f6f8-477a-9d0c-d07868f96ed3</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,f33ba153-f6f8-477a-9d0c-d07868f96ed3.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,f33ba153-f6f8-477a-9d0c-d07868f96ed3.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=f33ba153-f6f8-477a-9d0c-d07868f96ed3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Well, 
</p>
        <p>
Some words about NHModeller. The basic idea is to have a central point where you define
the entities of your model, that is not the Xml Mapping itself,neigther a databse
schema nor the classes. The idea actually is not so different from modelling starting
from the mapping files, but Xml is orrible to write, even with intellisense. NHModeller
aim to make simpler writing a mapping, and generates the real one as one of the artifacts. 
</p>
        <p>
The project uses <strong>MGrammar</strong> as a parser generator for the DSL 
and <strong>Intellipad </strong>as the preferred editor. Both these comes from the <a href="http://msdn.microsoft.com/en-us/oslo/default.aspx"><strong>Microsoft
"Oslo" Project</strong></a>, still CTP at present. 
</p>
        <p>
The version I have developed till now deal correctly with: 
</p>
        <ul>
          <li>
Native Keys ( implicit ) or any other simple key ( not composite )</li>
          <li>
Property Mapping</li>
          <li>
One-To-Many mappings</li>
          <li>
Many-To-One mappings 
<br /></li>
          <li>
Many-To-Many Mappings</li>
          <li>
Lazy / Eager fetching</li>
          <li>
Subclass<br /></li>
        </ul>
        <p>
 I will post here a screenshot of the actual present version, running a just
for fun blog model: 
</p>
        <p>
  
</p>
        <p>
          <img src="http://www.felicepollano.com/public/e9355c6d-0ff1-45c2-982c-c7e55959abfa.png" alt="" />
          <br />
          <br />
When a model is created, we have to launch the code generation. This is achieved by
a console application, and intellipad is just spawning the process after asking the
parameters. 
</p>
        <p>
The UI is not so good, due to my inexperience both in WPF and intellipad :( 
</p>
        <p>
  
</p>
        <p>
          <img src="http://www.felicepollano.com/public/bdb58f74-9e6c-4c3f-9c02-2d9d64ceeec6.png" alt="" />
          <br />
          <br />
After the generation we can have a glance to the artifacts generated we have: 
</p>
        <ul>
          <li>
Classes files 
</li>
          <li>
Xml for NHibernate mapping 
</li>
          <li>
And, expecialli thanks to NHibernate SchemaExport class, the DDL for our preferred
DB ( at least if it is NH compliant ) 
</li>
        </ul>
        <p>
  
</p>
        <p>
  
</p>
        <p>
          <img src="http://www.felicepollano.com/public/8e175779-64d9-4a70-8c10-f31f09aa86b1.png" alt="" />
          <br />
          <br />
The DDL is the most interesting part, expecially for me that I hate dealing with DB
schemas... Here below an example of a DDL created for the blog model for SQL Server
and Oracle. 
</p>
        <p>
  
</p>
        <p>
  
</p>
        <p>
          <img src="http://www.felicepollano.com/public/62a381dc-8e7c-4826-a268-a5259b6f94be.png" alt="" />
          <br />
          <br />
Well, there is some more works, even if the generator till now let a newbie to start
using NHibernate in minutes. We just need to compile the files in an assembly ( remember
to put "Compile as" "Embedd Resource" for the hbm files), and
start using the model. 
</p>
        <p>
Further Step-- Let use SchemaUpdate to modify a running model, deal with Components,
Composite Key, Indices, One-to-One mapping.  
</p>
        <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=f33ba153-f6f8-477a-9d0c-d07868f96ed3" />
      </body>
      <title>NHModeller - Work In Progress.</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,f33ba153-f6f8-477a-9d0c-d07868f96ed3.aspx</guid>
      <link>http://www.felicepollano.com/2009/04/19/NHModellerWorkInProgress.aspx</link>
      <pubDate>Sun, 19 Apr 2009 18:51:00 GMT</pubDate>
      <description>&lt;p&gt;
Well, 
&lt;/p&gt;
&lt;p&gt;
Some words about NHModeller. The basic idea is to have a central point where you define
the entities of your model, that is not the Xml Mapping itself,neigther a databse
schema nor the classes. The idea actually is not so different from modelling starting
from the mapping files, but Xml is orrible to write, even with intellisense. NHModeller
aim to make simpler writing a mapping, and generates the real one as one of the artifacts. 
&lt;/p&gt;
&lt;p&gt;
The project uses &lt;strong&gt;MGrammar&lt;/strong&gt; as a parser generator for the DSL&amp;nbsp;
and &lt;strong&gt;Intellipad &lt;/strong&gt;as the preferred editor. Both these comes from the &lt;a href="http://msdn.microsoft.com/en-us/oslo/default.aspx"&gt;&lt;strong&gt;Microsoft
&amp;quot;Oslo&amp;quot; Project&lt;/strong&gt;&lt;/a&gt;, still CTP at present. 
&lt;/p&gt;
&lt;p&gt;
The version I have developed till now deal correctly with: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Native Keys ( implicit ) or any other simple key ( not composite )&lt;/li&gt;
&lt;li&gt;
Property Mapping&lt;/li&gt;
&lt;li&gt;
One-To-Many mappings&lt;/li&gt;
&lt;li&gt;
Many-To-One mappings 
&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;
Many-To-Many Mappings&lt;/li&gt;
&lt;li&gt;
Lazy / Eager fetching&lt;/li&gt;
&lt;li&gt;
Subclass&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&amp;nbsp;I will post here a screenshot of the actual present version, running a just
for fun blog model: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/e9355c6d-0ff1-45c2-982c-c7e55959abfa.png" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
When a model is created, we have to launch the code generation. This is achieved by
a console application, and intellipad is just spawning the process after asking the
parameters. 
&lt;/p&gt;
&lt;p&gt;
The UI is not so good, due to my inexperience both in WPF and intellipad :( 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/bdb58f74-9e6c-4c3f-9c02-2d9d64ceeec6.png" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the generation we can have a glance to the artifacts generated we have: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Classes files 
&lt;/li&gt;
&lt;li&gt;
Xml for NHibernate mapping 
&lt;/li&gt;
&lt;li&gt;
And, expecialli thanks to NHibernate SchemaExport class, the DDL for our preferred
DB ( at least if it is NH compliant ) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/8e175779-64d9-4a70-8c10-f31f09aa86b1.png" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
The DDL is the most interesting part, expecially for me that I hate dealing with DB
schemas... Here below an example of a DDL created for the blog model for SQL Server
and Oracle. 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/62a381dc-8e7c-4826-a268-a5259b6f94be.png" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
Well, there is some more works, even if the generator till now let a newbie to start
using NHibernate in minutes. We just need to compile the files in an assembly ( remember
to put &amp;quot;Compile as&amp;quot; &amp;quot;Embedd Resource&amp;quot; for the hbm files), and
start using the model. 
&lt;/p&gt;
&lt;p&gt;
Further Step-- Let use SchemaUpdate to modify a running model, deal with Components,
Composite Key, Indices, One-to-One mapping.&amp;nbsp; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=f33ba153-f6f8-477a-9d0c-d07868f96ed3" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,f33ba153-f6f8-477a-9d0c-d07868f96ed3.aspx</comments>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=fef55d84-8de2-4bbb-a56a-2a9a98270608</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,fef55d84-8de2-4bbb-a56a-2a9a98270608.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,fef55d84-8de2-4bbb-a56a-2a9a98270608.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fef55d84-8de2-4bbb-a56a-2a9a98270608</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
  
</p>
        <p>
The first test of NHModeller in intellipad: 
</p>
        <p>
  
</p>
        <img src="http://www.felicepollano.com/public/adde6346-44a4-4317-a642-3f358d5af435.PNG" alt="" />
        <br />
        <br />
A new "Mode" that show sintax coloring and run time error checking. This
allow writing the DSL a little better than using the old friend Notepad. <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=fef55d84-8de2-4bbb-a56a-2a9a98270608" /></body>
      <title>NHModeller in Intellipad</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,fef55d84-8de2-4bbb-a56a-2a9a98270608.aspx</guid>
      <link>http://www.felicepollano.com/2009/04/15/NHModellerInIntellipad.aspx</link>
      <pubDate>Wed, 15 Apr 2009 16:10:00 GMT</pubDate>
      <description>&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
The first test of NHModeller in intellipad: 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;img src="http://www.felicepollano.com/public/adde6346-44a4-4317-a642-3f358d5af435.PNG" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
A new &amp;quot;Mode&amp;quot; that show sintax coloring and run time error checking. This
allow writing the DSL a little better than using the old friend Notepad. &lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=fef55d84-8de2-4bbb-a56a-2a9a98270608" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,fef55d84-8de2-4bbb-a56a-2a9a98270608.aspx</comments>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=877edf52-3817-4a15-90f8-43f02abedf11</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,877edf52-3817-4a15-90f8-43f02abedf11.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,877edf52-3817-4a15-90f8-43f02abedf11.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=877edf52-3817-4a15-90f8-43f02abedf11</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I decided to stops developing a completely new GUI for NHModeller, but I would like
to use Intellipad instead. Intellipad is a higly configurable editor that ships with
Microsoft "Oslo" SDK ctp. So far I wrote an initial NHModeller command line
version, and decided to start writing a plugin for Intellipad, or, better a "Mode".
The task is not so difficult, thanks to these blogs: 
</p>
        <ul>
          <li>
            <a href="http://blogs.msdn.com/intellipad/default.aspx" target="_blank">The Intellipad
Blog </a>
          </li>
          <li>
            <a href="http://blog.codeslower.com/2008/11/Syntax-Coloring-for-Your-Custom-Mg-Language-with-Intellipad" target="_blank">Codeslower </a>
          </li>
        </ul>
Until now i found a little annoying thing: It is not possible to add a command to
the MiniBuffer without directly modifying a script that in shipped with Intellipad.
It would be really nice if some extension point were exposed, so that a new mode can
add new commands to the minibuffer.<br /><p>
  
</p><img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=877edf52-3817-4a15-90f8-43f02abedf11" /></body>
      <title>NHModeller in intellipad</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,877edf52-3817-4a15-90f8-43f02abedf11.aspx</guid>
      <link>http://www.felicepollano.com/2009/04/11/NHModellerInIntellipad.aspx</link>
      <pubDate>Sat, 11 Apr 2009 21:41:00 GMT</pubDate>
      <description>&lt;p&gt;
I decided to stops developing a completely new GUI for NHModeller, but I would like
to use Intellipad instead. Intellipad is a higly configurable editor that ships with
Microsoft &amp;quot;Oslo&amp;quot; SDK ctp. So far I wrote an initial NHModeller command line
version, and decided to start writing a plugin for Intellipad, or, better a &amp;quot;Mode&amp;quot;.
The task is not so difficult, thanks to these blogs: 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://blogs.msdn.com/intellipad/default.aspx" target="_blank"&gt;The Intellipad
Blog &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://blog.codeslower.com/2008/11/Syntax-Coloring-for-Your-Custom-Mg-Language-with-Intellipad" target="_blank"&gt;Codeslower &lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
Until now i found a little annoying thing: It is not possible to add a command to
the MiniBuffer without directly modifying a script that in shipped with Intellipad.
It would be really nice if some extension point were exposed, so that a new mode can
add new commands to the minibuffer.&lt;br /&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=877edf52-3817-4a15-90f8-43f02abedf11" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,877edf52-3817-4a15-90f8-43f02abedf11.aspx</comments>
      <category>NHModeller</category>
    </item>
    <item>
      <trackback:ping>http://www.felicepollano.com/Trackback.aspx?guid=396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7</trackback:ping>
      <pingback:server>http://www.felicepollano.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.felicepollano.com/PermaLink,guid,396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7.aspx</pingback:target>
      <dc:creator>Felice Pollano</dc:creator>
      <wfw:comment>http://www.felicepollano.com/CommentView,guid,396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7.aspx</wfw:comment>
      <wfw:commentRss>http://www.felicepollano.com/SyndicationService.asmx/GetEntryCommentsRss?guid=396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I'm working on a little project to satisfy my idea on creating a mapping for NHibernate
describing the model entities in a notepad like fashion. The application I created
leverage a new SDK from microsof, at present in CTP: Microsoft Oslo SDK. 
</p>
        <p>
The application starts from a very simple language, and starting from this creates
the clsses, the hbm's and the database script ( Database script at the moment
does not work... ;) 
</p>
        <p>
). The application deal with collections,references, subclassing, and many-to-many
relationship. 
</p>
        <p>
Lets have a couple of screenshot, the first one about a relation Books-Authors... 
</p>
        <p>
  This is the hbm (whit all the mapping in a single view ): 
</p>
        <p>
          <img src="http://www.felicepollano.com/public/ea90496c-9b1f-4f27-bda5-f16668a09e99.png" alt="" />
          <br />
and this the mapping ( all the classes in a view): 
</p>
        <p>
  
</p>
        <p>
          <img src="http://www.felicepollano.com/public/e0c0330a-08df-47b0-9ba7-2666221c9ef5.png" alt="" />
          <br />
          <br />
A sample with subclassing ( a just for fun financial model ) 
</p>
        <p>
  
</p>
        <img src="http://www.felicepollano.com/public/16e98f0d-e10f-4a96-a135-9e82e4f6f410.png" alt="" />
        <br />
        <img src="http://www.felicepollano.com/public/0eafbe4d-a74d-4fbc-a835-fd21e4da3235.png" alt="" />
        <br />
        <br />
Well, there is still some bugs, but the application really do what expected: a lot
of boring code line autogenerated from an intuitive textual DSL. <img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7" /></body>
      <title>A textual DSL for NHibernate mapping</title>
      <guid isPermaLink="false">http://www.felicepollano.com/PermaLink,guid,396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7.aspx</guid>
      <link>http://www.felicepollano.com/2009/02/17/ATextualDSLForNHibernateMapping.aspx</link>
      <pubDate>Tue, 17 Feb 2009 02:40:00 GMT</pubDate>
      <description>&lt;p&gt;
I&amp;#39;m working on a little project to satisfy my idea on creating a mapping for NHibernate
describing the model entities in a notepad like fashion. The application I created
leverage a new SDK from microsof, at present in CTP: Microsoft Oslo SDK. 
&lt;/p&gt;
&lt;p&gt;
The application starts from a very simple language, and starting from this creates
the clsses, the hbm&amp;#39;s and the database script ( Database script at the moment
does not work... ;) 
&lt;/p&gt;
&lt;p&gt;
). The application deal with collections,references, subclassing, and many-to-many
relationship. 
&lt;/p&gt;
&lt;p&gt;
Lets have a couple of screenshot, the first one about a relation Books-Authors... 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; This is the hbm (whit all the mapping in a single view ): 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/ea90496c-9b1f-4f27-bda5-f16668a09e99.png" alt="" /&gt;
&lt;br /&gt;
and this the mapping ( all the classes in a view): 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;p&gt;
&lt;img src="http://www.felicepollano.com/public/e0c0330a-08df-47b0-9ba7-2666221c9ef5.png" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
A sample with subclassing ( a just for fun financial model ) 
&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; 
&lt;/p&gt;
&lt;img src="http://www.felicepollano.com/public/16e98f0d-e10f-4a96-a135-9e82e4f6f410.png" alt="" /&gt;
&lt;br /&gt;
&lt;img src="http://www.felicepollano.com/public/0eafbe4d-a74d-4fbc-a835-fd21e4da3235.png" alt="" /&gt;
&lt;br /&gt;
&lt;br /&gt;
Well, there is still some bugs, but the application really do what expected: a lot
of boring code line autogenerated from an intuitive textual DSL. &lt;img width="0" height="0" src="http://www.felicepollano.com/aggbug.ashx?id=396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7" /&gt;</description>
      <comments>http://www.felicepollano.com/CommentView,guid,396151ac-68b4-4b3a-b6eb-b03b5b0a6cf7.aspx</comments>
      <category>NHModeller</category>
    </item>
  </channel>
</rss>