主题 : 不知道这样改的对不对?改正主站取到子站数据的问题,版主有空分析下
级别: 白丁
UID: 8674
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-07-04
在线时长:0
1#   发表于:2011-01-05 11:09:28  IP:122.122.*.*
Finder f = Finder.create("select bean from Article bean");
if (chnlId != null) {
//这里有bug
//   f.append(" inner join bean.channel node,CmsChannel parent");
//   f.append(" where node.lft between parent.lft and parent.rgt");
// f.append(" and parent.id=:chnlId").setParam("chnlId", chnlId);

改为下面,where node.lft between parent.lft and parent.rgt这句话看不明白什么意图
  f.append(" inner join bean.channel node");
  f.append(" where node.id=:chnlId").setParam("chnlId", chnlId);
  
}
级别: 童生
UID: 10739
积分:3 加为好友
威望: 0 精华: 0
主题:0 回复:3
注册时间:2010-09-08
在线时长:0
2#   发表于:2011-01-05 11:20:24  IP:59.136.*.*
您测试过修改后的结果吗?
级别: 白丁
UID: 8674
积分:1 加为好友
威望: 0 精华: 0
主题:0 回复:1
注册时间:2010-07-04
在线时长:0
3#   发表于:2011-01-05 12:21:00  IP:122.122.*.*
测试过,可以的,where node.lft between parent.lft and parent.rgt这句话看不明白什么意图
1 共1页