0
時運行下面的代碼:實體發現與選擇場給出錯誤味精
<entity-find entity-name="mantle.order.OrderHeaderPartFacilityStatus" list="orderPartList">
<econdition field-name="facilityId" from = "facilityId"/>
<econdition field-name="statusId" operator="in" value="OrderPlaced,"/>
<!-- <select-field field-name="orderId, "/> -->
<!-- <select-field field-name="orderName"/> -->
<!-- <select-field field-name="placedDate"/> -->
<!-- <select-field field-name="grandTotal"/> -->
<!-- <select-field field-name="orderPartSeqId"/> -->
<!-- <select-field field-name="facilityId"/> -->
<!-- <select-field field-name="facilityName"/> -->
<!-- <select-field field-name="partStatusId"/> -->
<!-- <order-by field-name="orderPartSeqId"/> -->
</entity-find>
我:
"orderPartList": [
{
"enteredByPartyId": null,
"salesChannelEnumId": null,
"recurrenceInfoId": null,
"customerRoleTypeId": "Manager",
"billingAccountId": null,
"placedDate": "2016-01-01T00:00:00+0000",
"telecomContactMechId": null,
"postalContactMechId": null,
"vendorRoleTypeId": null,
"visitId": null,
"lastOrderedDate": null,
"remainingSubTotal": null,
"trackingNumber": null,
"otherPartyOrderId": null,
"statusId": "OrderPlaced",
"giftMessage": null,
"entryDate": null,
"shippingInstructions": null,
"autoCancelDate": null,
"estimatedDeliveryDate": null,
"customerPartyId": "EX_JOHN_DOE",
"validThruDate": null,
"carrierPartyId": null,
"partTotal": 5.1E+2,
"facilityId": "FWorkshopnanneihuan",
"syncStatusId": null,
"estimatedShipDate": null,
"validFromDate": null,
"estimatedPickUpDate": null,
"externalRevision": null,
"orderPartSeqId": "01",
"terminalId": null,
"shipmentMethodEnumId": null,
"shipBeforeDate": null,
"parentOrderId": null,
"isGift": null,
"productStoreId": null,
"orderRevision": 26,
"dontCancelSetDate": null,
"pseudoId": "FWorkshopnanneihuan",
"dontCancelSetUserId": null,
"systemMessageRemoteId": null,
"maySplit": null,
"externalId": null,
"parentPartSeqId": null,
"facilityName": "\u5357\u5185\u73af\u8f66\u95f4",
"orderId": "FOJohndoePassat",
"vendorPartyId": null,
"shipAfterDate": null,
"currencyUomId": null,
"orderName": "John_doe order 1",
"grandTotal": 5.1E+2,
"partStatusId": "OrderOpen",
"partName": "\u7b2c\u4e00\u90e8\u5206 John doe",
"statusDescription": "Placed"
}
],
但是,當我註釋掉選擇字段標籤,如下:
<entity-find entity-name="mantle.order.OrderHeaderPartFacilityStatus" list="orderPartList">
<econdition field-name="facilityId" from = "facilityId"/>
<econdition field-name="statusId" operator="in" value="OrderPlaced,"/>
<select-field field-name="orderId, "/>
<!-- <select-field field-name="orderName"/> -->
<!-- <select-field field-name="placedDate"/> -->
<!-- <select-field field-name="grandTotal"/> -->
<!-- <select-field field-name="orderPartSeqId"/> -->
<!-- <select-field field-name="facilityId"/> -->
<!-- <select-field field-name="facilityName"/> -->
<!-- <select-field field-name="partStatusId"/> -->
<!-- <order-by field-name="orderPartSeqId"/> -->
</entity-find>
然後我得到了以下錯誤味精,這可能表明,選擇SQL不工作:
{"errorCode":500,"errors":"java.lang.IllegalArgumentException: Maps with null keys can't be converted to JSON"}
有什麼問題嗎? 我正在使用自定義數據運行MoquiDemo-2.0.0。 這可能是一個錯誤或什麼?有人有線索?
謝謝你的評論。我使用逗號來提醒我將爲值元組添加更多值。我認爲Moqui會擺脫元組中的空白元素。沒有擺脫空白是相當可觀的,因爲有時人們需要空白作爲有效的價值。正如你所說,我擺脫了逗號,返回值是獲取所有其他字段與空值設置除選定的字段。它是否應該只提取被選擇的字段的值,並只顯示被選中的字段? – jizhi