NHibernate & Spring.NET关联查询问题
CREATE TABLE t_log
(
fid identity(int,1,1),
fuserid varchar(50),
fip varchar(50),
fmac varchar(50),
ftime datetime,
ftype integer,
fdbid varchar(50),
ffldid varchar(50),
foperate varchar(50),
flevel integer,
fremark varchar(50)
)
CREATE TABLE t_reltype
(
fid identity(int,1,1),
ftablename varchar(50),
ffieldid varchar(50),
ftype integer,
fname varchar(50)
)
其中ftype与表t_reltype关联
现需在UI界面显示数据列表,需要将两个表进行关联查询
如:select t.*,q.fname as cn_type from t_log as a left join t_reltype as q on t.ftype=q.ftype and q.ftablename='t_log' where fid>10 order by t.fid desc
这种问题在NHibernate中如何解决?利用一对多,多对多,多对一处理??