您好我正在寻找在映射下表为Hibernate映射文件中的一些帮助: schema image http://barry-jones.com/temp/sch2.jpgNHibernate的映射表中介
我试图加载我userVOs时填的localCalandarGroups列表与相关localCalendarGroups。我使用的是中介表(user_localCalendarGroup),以确保用户和localCalendarGroup IDS
public class UserVO
{
public virtual int id { get; set; }
public virtual string name { get; set; }
public virtual string pass { get; set; }
public virtual string email { get; set; }
public virtual string level { get; set; }
public virtual List<LocalCalendarGroupVO> localCalendarGroups { get; set; }
}
public class LocalCalendarGroupVO
{
public virtual int id { get; set; }
public virtual string name { get; set; }
}
这是我的映射文件迄今。我如何让NHibernate知道中间表?
<class name="UserVO" table="tb_users" lazy="false">
<id name="id" column="id">
<generator class="native" />
</id>
<property name="name" />
<property name="pass" />
<property name="level" />
<property name="email" />
<property name="localCalendarGroups"/>
任何帮助,指针赞赏。
感谢您的支持。不幸的是,我不断收到映射异常。我会玩一玩,看看我是否解决不了。再次感谢。 – user17510 2008-12-30 11:40:40