没有一对多关系的时候,就没有问题,但是加上<bag name="Imageses" inverse="true" lazy="true" cascade="all-delete-orphan">
<key column="ImageTypeID"/>
<one-to-many class="EE56.Model.ImagesInfo, EE56.Model"/>
</bag>获取sessionFactroy的时候就提示Could not compile the mapping document,好郁闷吖,还有谁用果nhibernate2.0的,有关于一对多操作的,麻烦给个例子我看看,做项目,急啊
------解决方案--------------------------------------------------------
Company.cs
- C# code
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
namespace DirectCenter.Model
{
[Serializable]
public class Company
{
#region Property Members
/// <summary>
/// 编号
/// </summary>
public virtual string CompanyID
{
get;
set;
}
/// <summary>
/// 全称(本地化名称)
/// </summary>
public virtual string FullName
{
get;
set;
}
/// <summary>
/// 负责人
/// </summary>
public virtual string Principal
{
get;
set;
}
/// <summary>
/// 联系人
/// </summary>
public virtual string Linkman
{
get;
set;
}
/// <summary>
/// 资产
/// </summary>
public virtual decimal RegistryAsset
{
get;
set;
}
/// <summary>
/// 员工人数
/// </summary>
public virtual int Employees
{
get;
set;
}
/// <summary>
/// 国家
/// </summary>
public virtual string Country
{
get;
set;
}
/// <summary>
/// 地区(华东区、华南区)
/// </summary>
public virtual string Region
{
get;
set;
}
/// <summary>
/// 省份
/// </summary>
public virtual string Province
{
get;
set;
}
/// <summary>
/// 联系电话
/// </summary>
public virtual string Telephone
{
get;
set;
}
/// <summary>
/// 传真号码
/// </summary>
public virtual string Fax
{
get;
set;
}
/// <summary>