<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Fluent_NHibernate%2F%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0</id>
	<title>Fluent NHibernate/オートマッピング - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://monobook.org/w/index.php?action=history&amp;feed=atom&amp;title=Fluent_NHibernate%2F%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0"/>
	<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Fluent_NHibernate/%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0&amp;action=history"/>
	<updated>2026-06-05T00:17:01Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://monobook.org/w/index.php?title=Fluent_NHibernate/%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0&amp;diff=2428&amp;oldid=prev</id>
		<title>2012年7月8日 (日) 05:38にimported&gt;Administratorによる</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Fluent_NHibernate/%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0&amp;diff=2428&amp;oldid=prev"/>
		<updated>2012-07-08T05:38:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2012年7月8日 (日) 05:38時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l49&quot;&gt;49行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;49行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 関連項目 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 関連項目 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Fluent NHibernate]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Fluent NHibernate]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Fluent NHibernate/フルーエントマッピング]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 参考文献 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 参考文献 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;referecnes&lt;/del&gt;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;references&lt;/ins&gt;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 外部リンク ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== 外部リンク ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{stub}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{stub}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
	<entry>
		<id>https://monobook.org/w/index.php?title=Fluent_NHibernate/%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0&amp;diff=2427&amp;oldid=prev</id>
		<title>imported&gt;Administrator: ページの作成：「Fluent NHibernateには&#039;&#039;&#039;オートマッピング&#039;&#039;&#039;（auto mappings）という、プログラマが書いたエンティティ（クラス）から自動的に...」</title>
		<link rel="alternate" type="text/html" href="https://monobook.org/w/index.php?title=Fluent_NHibernate/%E3%82%AA%E3%83%BC%E3%83%88%E3%83%9E%E3%83%83%E3%83%94%E3%83%B3%E3%82%B0&amp;diff=2427&amp;oldid=prev"/>
		<updated>2012-07-08T05:34:20Z</updated>

		<summary type="html">&lt;p&gt;ページの作成：「Fluent NHibernateには&amp;#039;&amp;#039;&amp;#039;オートマッピング&amp;#039;&amp;#039;&amp;#039;（auto mappings）という、&lt;a href=&quot;/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9E&quot; class=&quot;mw-redirect&quot; title=&quot;プログラマ&quot;&gt;プログラマ&lt;/a&gt;が書いたエンティティ（クラス）から自動的に...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Fluent NHibernateには&amp;#039;&amp;#039;&amp;#039;オートマッピング&amp;#039;&amp;#039;&amp;#039;（auto mappings）という、[[プログラマ]]が書いたエンティティ（クラス）から自動的にリレーショナルデータベース上にテーブルなどを生成する機能がある。&lt;br /&gt;
&lt;br /&gt;
== 使用例 ==&lt;br /&gt;
まず、以下のようなエンティティクラスを記述する。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
public class Product&lt;br /&gt;
{&lt;br /&gt;
    public virtual int Id { get; set; }&lt;br /&gt;
    public virtual string Name { get; set; }&lt;br /&gt;
    public virtual decimal Price { get; set; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class Shelf&lt;br /&gt;
{&lt;br /&gt;
    public virtual int Id { get;  set; }&lt;br /&gt;
    public virtual IList&amp;lt;Product&amp;gt; Products { get; set; }&lt;br /&gt;
&lt;br /&gt;
    public Shelf()&lt;br /&gt;
    {&lt;br /&gt;
        Products = new List&amp;lt;Product&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fluent NHibernateの接続設定の中にオートマッピングに関する記述をし、[[プログラム]]を実行すると、[[データベース]]への初回接続時にクラスに対応するテーブルなどを自動生成しようと試みる。何かしらの理由で生成に失敗した場合は例外が発生する。&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
using FluentNHibernate;&lt;br /&gt;
using FluentNHibernate.Cfg;&lt;br /&gt;
using FluentNHibernate.Cfg.Db;&lt;br /&gt;
using FluentNHibernate.Automapping;&lt;br /&gt;
using NHibernate;&lt;br /&gt;
using NHibernate.Tool.hbm2ddl;&lt;br /&gt;
&lt;br /&gt;
public class SampleApp&lt;br /&gt;
{&lt;br /&gt;
    public void Main(string[] args)&lt;br /&gt;
    {&lt;br /&gt;
        // MySQLの場合&lt;br /&gt;
        var fnConfig = Fluently.Configure()&lt;br /&gt;
            .Database(/* 接続設定 */)&lt;br /&gt;
            .Mappings(map =&amp;gt; &lt;br /&gt;
                map.AutoMappings.Add(AutoMap.AssemblyOf&amp;lt;Product&amp;gt;()) // これがオートマッピングの指定。Productクラスと愉快な仲間たちが自動的マッピングされる。&lt;br /&gt;
            )&lt;br /&gt;
            ;&lt;br /&gt;
        var factory = fnConfig.BuildSessionFactory();&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 関連項目 ==&lt;br /&gt;
* [[Fluent NHibernate]]&lt;br /&gt;
&lt;br /&gt;
== 参考文献 ==&lt;br /&gt;
&amp;lt;referecnes/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 外部リンク ==&lt;br /&gt;
&lt;br /&gt;
{{stub}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Administrator</name></author>
	</entry>
</feed>