Subsonic 3 左外连接
我有一个问题。我想
下创建 sql 问题select * from Firma left external join FirmaAdres on FirmaAdres.Typ = 1 和 FirmaAdres.FirmaID = Firma.ID
在亚音速
我已经编写了
SelectColumns("Firma.*").From().LeftOuterJoin(FirmaTable. IDColumn, FirmaAdresTable.FirmaIDColumn).And(FirmaAdresTable.AdresTypIDColumn).IsEqualTo(1)
当我检查创建的 sql 问题时,我注意到左外连接更改为内连接!
有人可以帮助我吗?
I have a problem. I want to create sql question
select * from Firma left outer join FirmaAdres on FirmaAdres.Typ = 1 and FirmaAdres.FirmaID = Firma.ID
in subsonic
I have written
SelectColumns("Firma.*").From().LeftOuterJoin(FirmaTable.IDColumn, FirmaAdresTable.FirmaIDColumn).And(FirmaAdresTable.AdresTypIDColumn).IsEqualTo(1)
When I checked what sql question is created I noticed then left outer join is changed to Inner join!!!
Could anyone help me??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Subsonic 不支持 LeftOuterJoin。您需要模拟 LINQ 中的左连接(请参阅 http://www.devsource.com/c/a/Languages/Defining-a-Left-Join-with-LINQ-Queries/ 了解更多详细信息)在我看来,这种努力并不值得等待你的痛苦。我建议你在这里使用一个简单、无聊、传统的存储过程。
Subsonic doesn't support LeftOuterJoin. You need to emulate the left join in LINQ (see http://www.devsource.com/c/a/Languages/Defining-a-Left-Join-with-LINQ-Queries/ for more details) In my opinion the effort don't deserves the pain that is wating for you. I suggest you to use a simple, boring and traditional stored procedure here.