プロパティvalue object (component)
を含むものを (xml ベースのアプローチを使用して) マップするにはどうすればよいですか?ISet<String>
[Serializable]
public class Contact
{
public ISet<String> PhoneNumbers { get; set; }
public String Email { get; set; }
}
ありがとう!
プロパティvalue object (component)
を含むものを (xml ベースのアプローチを使用して) マップするにはどうすればよいですか?ISet<String>
[Serializable]
public class Contact
{
public ISet<String> PhoneNumbers { get; set; }
public String Email { get; set; }
}
ありがとう!
を使用しelement
ます。
<set name="PhoneNumbers" table="phone_numbers">
<key column="contact_id">
<element column="phone_number" type="String"/>
</set>
表示目的のためだけに PhoneNumbers プロパティを使用する場合は、コレクションをフェッチするための個別のテーブルと個別のクエリを使用せずに、データをシリアル化する「より安価な」アプローチを検討してください。