1
<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="CITI.manageID.Data.Entities.AuthUserKioskRoleMap,CITI.manageID.Data" table="AuthUserKioskRoleMap" lazy="false">
<composite-id name="Id" class="CITI.manageID.Data.Entities.AuthUserKioskRoleMapId,CITI.manageID.Data">
<key-many-to-one name="AuthUsers" class="CITI.manageID.Data.Entities.AuthUsers,CITI.manageID.Data" column="UserID" />
<key-many-to-one name="KioskInfo" class="CITI.manageID.Data.Entities.KioskInfo,CITI.manageID.Data" column="KioskID" />
<key-many-to-one name="AuthRole" class="CITI.manageID.Data.Entities.AuthRole,CITI.manageID.Data" column="Roleid" />
</composite-id>
<property name="Status" column="Status" type="string" />
<property name="CreatedBy" column="CreatedBy" type="string" not-null="true" />
<property name="CreatedOn" column="CreatedOn" type="DateTime" not-null="true" />
<property name="UpdatedBy" column="UpdatedBy" type="string" />
<property name="UpdatedOn" column="UpdatedOn" type="DateTime" />
<many-to-one name="AuthRole" column="Roleid" cascade="save-update" not-null="true" />
<many-to-one name="AuthUsers" column="UserID" cascade="save-update" not-null="true" />
<many-to-one name="KioskInfo" column="KioskID" cascade="save-update" not-null="true" />
</class>
</hibernate-mapping>
ICriteria crit = SessionRepository.CreateRepositoryCriteria(typeof(AuthUserKioskRoleMap));
crit.Add(Expression.InsensitiveLike("AuthUsers.Userid", AuthUserID));
crit.Add(Expression.InsensitiveLike("KioskInfo.Kioskid", KioskID));
crit.Add(Expression.InsensitiveLike("Id.AuthUsers.Status", "A"));
crit.Add(Expression.InsensitiveLike("Id.KioskInfo.Status", "A"));
crit.Add(Expression.InsensitiveLike("Id.AuthRole.Status ", "A"));
crit.Add(Expression.InsensitiveLike("Status", "A"));
crit.AddOrder(new Order("ImageType", true));
ApplicantFaceInfoList = crit.List<AuthUserKioskRoleMap>();
請幫助
如果你**能夠獲取**的數據 - 這是什麼問題?你的問題是什麼? –
我懷疑標題應該是「我不能......」我投票重新打開。 IMO S.O.用戶有時會快速判斷。 – Rippo
@sanjay - 標題應該是「我無法獲取數據..」嗎? – Rippo