我需要获取在某个字段中具有最大日期的实体。我用 Stunnware 尝试了下面的代码,但它给了我一个错误,即 MAX 函数无效。
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false' aggregate='true'>
<entity name='field1'>
<attribute name='field2' />
<attribute name='field3' />
<attribute name='field4' />
<order attribute='field1' descending='false' />
<link-entity name='contact' from='field1' to='otherfield' alias='ac'>
<filter type='and'>
<condition attribute='field5' operator='eq' value='123456' />
</filter>
</link-entity>
<link-entity name='secondentity' from='field2' to='otherfield' visible='false' link-type='outer' alias='a_6c61a84be522e31194080050569c4325'>
<attribute name='date' alias='maxdate' aggregate='max' />
</link-entity>
</entity>
</fetch>
你能帮我指出我正在做的错误吗?