Active record 中如何执行多对多的关联查询?
2007-07-18 23:20 爱车龟速兔 阅读(287) 评论(0) 编辑 收藏 举报SimpleQuery query = new SimpleQuery(typeof(FunctionOperation),
@"FROM FunctionOperation o INNER JOIN FETCH o.RoleUsers r WHERE r.UserName=? ORDER BY o.FunOperationID", userName);
FunctionOperation[] arrUserFunctionOperation = (FunctionOperation[])FunctionOperation.ExecuteQuery(query);