技术文章 - CS336660
ODATA:过滤器 AssociationType/Value eq 'OWNER' 失败,在 WRS 2.1 上出现“类型 PTC.CADDocumentMgmt.AssociationTypeEnum 和 EDM.String 不兼容”
已修改: 20-Feb-2022
适用于
- Windchill PDMLink 11.1
说明
- 如何使用枚举在 WRS 中过滤?
- 使用 WRS2.1,以下请求失败:
$filter AssociationType/Value eq 'OWNER'
GET odata/v5/ProdMgmt/Parts('OR%3Awt.part.WTPart%3A5914167')/PartDocAssociations?%24filter=AssociationType%2FValue%20eq%20%20'OWNER'&%24count=false "code": null, "message": "The types 'PTC.CADDocumentMgmt.AssociationTypeEnum' and 'Edm.String' are not compatible." ERROR [ajp-nio-127.0.0.1-8010-exec-42] com.ptc.odata.windchill.servlet.WcRestServlet wcadmin - An unexpected REST error occured Incompatible types. at org.apache.olingo.server.core.uri.parser.ExpressionParser.checkEqualityTypes(ExpressionParser.java:1257) at org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExprEquality(ExpressionParser.java:223) at org.apache.olingo.server.core.uri.parser.ExpressionParser.parseAnd(ExpressionParser.java:204) at org.apache.olingo.server.core.uri.parser.ExpressionParser.parseExpression(ExpressionParser.java:190) at org.apache.olingo.server.core.uri.parser.ExpressionParser.parse(ExpressionParser.java:184) at org.apache.olingo.server.core.uri.parser.FilterParser.parse(FilterParser.java:48) at org.apache.olingo.server.core.uri.parser.Parser.parseFilterOption(Parser.java:413)
这是文章 336660 的 PDF 版本,可能已过期。最新版本 CS336660