开发者

Linq-to-NHibernate subquery error: Unhandled expression type 1000

When I use a subquery like this in Linq-to-NHibernate I got error "Unhanded expression type 1000". This link contains same problem but does not provide any proper solution.

Does anybody know any solutions? I'm using NHibernate 2.1.2. I'm aware that new LINQ provider in NH3 has many improvements, but 开发者_如何学PythonI'm afraid I couldn't use NHibernate 3 because I'm using NHibernate through Castle ActiveRecord.

var innerQuery = from obj1 in ActiveRecordLinq.AsQueryable<TypeA>() 
where 
obj1.Prop1 == "abc"
select
obj1;

var outerQuery = from obj2 in ActiveRecordLinq.AsQuerable<TypeB>()
where
obj2.Prop2 == "def"
&&
innerQuery.Contains(obj2.TypeAProp)
select
obj2;


Not a real answer, but I'd upgrade to NH3 or else use HQL. It's well-known that LINQ in NH2.x is kind of limited.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜