You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Darren Lindley (JIRA)" <ji...@apache.org> on 2016/04/11 23:20:25 UTC
[jira] [Created] (OLINGO-930) Filter condition on an expanded
attribute fails with ClassCastException
Darren Lindley created OLINGO-930:
-------------------------------------
Summary: Filter condition on an expanded attribute fails with ClassCastException
Key: OLINGO-930
URL: https://issues.apache.org/jira/browse/OLINGO-930
Project: Olingo
Issue Type: Bug
Affects Versions: V2 2.0.6, V2 2.0.5
Reporter: Darren Lindley
i installed the sample cars/manufacturers application and tried this query:
http://localhost:8080/MyFormula.svc/Cars?$filter=ManufacturerDetails/Name%20eq%20%27SuperCar%27&$expand=ManufacturerDetails
this fails with the message:
class java.lang.ClassCastException : org.apache.olingo.odata2.core.edm.provider.EdmNavigationPropertyImplProv cannot be cast to org.apache.olingo.odata2.api.edm.EdmProperty
This appears to come from ODataExpressionParser:
{code:title=ODataExpressionParser.java|borderStyle=solid}
private static String getPropertyName(final CommonExpression whereExpression) throws EdmException {
EdmProperty property = ((EdmProperty) ((PropertyExpression) whereExpression).getEdmProperty());
EdmMapping mapping = property.getMapping();
String name = mapping != null ? mapping.getInternalName() : property.getName();
return name;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)