Я пытаюсь построить запрос Fetch XML, эквивалентный запросу SQL, я совсем недавно использую Fetch XML:
SELECT o.opportunityid,c1.accountid
FROM dbo.opportunity o
LEFT JOIN dbo.account c1 on o.customerid = c1.accountid and o.customeridtype = 1
в
<fetch mapping="logical" version="1.0">
<entity name="opportunity">
<attribute name="opportunityid" />
<link-entity name="account" from="accountid" to="customerid" alias="A1" link-type="outer" >
<filter type="and" >
<condition attribute="customeridtype" operator="eq" value="1" />
</filter>
<attribute name="accountid" />
</link-entity>
, но это выдает ошибку, говоря, что атрибут «customeridtype» не существует в сущности «account». этот атрибут взят из объекта возможности, как в запросе SQL. Как я могу это исправить?