这几天在学习nhibernate,
一路不是怎么顺的.今天又碰到了问题,一天都没解决
帮帮忙,谢谢
里面有sql2000数据库,附加就可以
环境:vs2008,.net framework3.5
下面以资源文件拱下载
http://files.cnblogs.com/guide/Nhibernate.rar
问题补充:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Entity.Position,Entity" table="tbPosition" lazy="false">
<id name="PositionID" column="PositionID" type="String" length="10">
<generator class="assigned"></generator>
</id>
<property name="PositionName" column="PositionName" type="String" length="20" />
<!--<set name="Employee" table="tbEmployee" cascade="all" inverse="true">
<key column="PositionID" />
<one-to-many class="Entity.Employee,Entity" />
</set>-->
</class>
</hibernate-mapping>
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Entity.Employee,Entity" table="tbEmployee" lazy="false">
<id name="EmployeeID" column="EmployeeID" type="String" length="10">
<generator class="assigned" />
</id>
<property name="EmployeeName" column="EmployeeName" type="String" length="10" />
<property name="PositionID" column ="PositionID" type="String" length="10" />
<!--<many-to-one name="PositionID" column="PositionID" unique="true"></many-to-one>-->
</class>
</hibernate-mapping>
如上屏蔽就可以正常运行
湖
|
初学一级
|
园豆:
0
提问于:2009-10-23 17:43