olingo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shumin Wang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OLINGO-1218) can not filter the string with "_"
Date Tue, 26 Dec 2017 07:48:00 GMT

     [ https://issues.apache.org/jira/browse/OLINGO-1218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shumin Wang updated OLINGO-1218:
--------------------------------
    Description: 
Hello, 

when I read all entityset, the result is 

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/">
<id>
https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet
</id>
<title type="text">CustomizedCardEntitySet</title>
<updated>2017-12-26T07:34:05.261Z</updated>
<author>
<name/>
</author>
<link href="CustomizedCardEntitySet" rel="self" title="CustomizedCardEntitySet"/>
<entry>
<id>
https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet(519L)
</id>
<title type="text">CustomizedCardEntitySet</title>
<updated>2017-12-26T07:34:05.261Z</updated>
<category term="CardAdminService.CustomizedCardEntity" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="CustomizedCardEntitySet(519L)" rel="edit" title="CustomizedCardEntity"/>
<content type="application/xml">
<m:properties>
<d:CardName>tttt</d:CardName>
<d:CardSubtitle>Card Subtitle</d:CardSubtitle>
<d:CardTitle>tttt</d:CardTitle>
<d:CardType>table</d:CardType>
<d:CreateOn>2017-12-22T06:44:24.54</d:CreateOn>
<d:CreatorId>I036207</d:CreatorId>
<d:CreatorName>null null</d:CreatorName>
{color:red}<d:Destination>northwind_CLONING_1</d:Destination>{color}
<d:Id>519</d:Id>
<d:Metadata>
{"serviceUri":"/","entityType":"NorthwindModel.Category","entitySet":"Categories","columns":[{"column":"CategoryID","displayName":"Column
1","columnIndex":1},{"column":"Description","displayName":"Column 2","columnIndex":2},{"column":"CategoryName","displayName":"Column
3","columnIndex":3}],"url":"","keys":[],"primarySort":{"key":"","order":""},"secondarySort":{"key":"","order":""}}
</d:Metadata>
<d:ModifierId>I036207</d:ModifierId>
<d:ModifierName>null null</d:ModifierName>
<d:UpdateOn>2017-12-22T06:44:24.54</d:UpdateOn>
</m:properties>
</content>
</entry>
</feed>




but when I add ?$filter=(Destination%20eq%20%27northwind_CLONING_1%27), the result is empty
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/">
<id>
https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet
</id>
<title type="text">CustomizedCardEntitySet</title>
<updated>2017-12-26T07:36:54.253Z</updated>
<author>
<name/>
</author>
<link href="CustomizedCardEntitySet" rel="self" title="CustomizedCardEntitySet"/>
</feed>

I have extend ODataJPAServiceFactory, in the class 

    public ODataSingleProcessor createCustomODataProcessor(ODataJPAContext oDataJPAContext)
{
        return new CardAdminODataJPAProcessor(oDataJPAContext);
    }

the CardAdminODataJPAProcessor is extend ODataJPADefaultProcessor, and I have not override
readEntitySet.

in the debug, I found the query becomes northwind\\_CLONING\\_1, instead of  northwind_CLONING_1.
I do not why we encode it. 


  was:
Hello, 

when I read all entityset, the result is 

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/">
<id>
https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet
</id>
<title type="text">CustomizedCardEntitySet</title>
<updated>2017-12-26T07:34:05.261Z</updated>
<author>
<name/>
</author>
<link href="CustomizedCardEntitySet" rel="self" title="CustomizedCardEntitySet"/>
<entry>
<id>
https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet(519L)
</id>
<title type="text">CustomizedCardEntitySet</title>
<updated>2017-12-26T07:34:05.261Z</updated>
<category term="CardAdminService.CustomizedCardEntity" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="CustomizedCardEntitySet(519L)" rel="edit" title="CustomizedCardEntity"/>
<content type="application/xml">
<m:properties>
<d:CardName>tttt</d:CardName>
<d:CardSubtitle>Card Subtitle</d:CardSubtitle>
<d:CardTitle>tttt</d:CardTitle>
<d:CardType>table</d:CardType>
<d:CreateOn>2017-12-22T06:44:24.54</d:CreateOn>
<d:CreatorId>I036207</d:CreatorId>
<d:CreatorName>null null</d:CreatorName>
<d:Destination>northwind_CLONING_1</d:Destination>
<d:Id>519</d:Id>
<d:Metadata>
{"serviceUri":"/","entityType":"NorthwindModel.Category","entitySet":"Categories","columns":[{"column":"CategoryID","displayName":"Column
1","columnIndex":1},{"column":"Description","displayName":"Column 2","columnIndex":2},{"column":"CategoryName","displayName":"Column
3","columnIndex":3}],"url":"","keys":[],"primarySort":{"key":"","order":""},"secondarySort":{"key":"","order":""}}
</d:Metadata>
<d:ModifierId>I036207</d:ModifierId>
<d:ModifierName>null null</d:ModifierName>
<d:UpdateOn>2017-12-22T06:44:24.54</d:UpdateOn>
</m:properties>
</content>
</entry>
</feed>




but when I add ?$filter=(Destination%20eq%20%27northwind_CLONING_1%27), the result is empty
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/">
<id>
https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet
</id>
<title type="text">CustomizedCardEntitySet</title>
<updated>2017-12-26T07:36:54.253Z</updated>
<author>
<name/>
</author>
<link href="CustomizedCardEntitySet" rel="self" title="CustomizedCardEntitySet"/>
</feed>

I have extend ODataJPAServiceFactory, in the class 

    public ODataSingleProcessor createCustomODataProcessor(ODataJPAContext oDataJPAContext)
{
        return new CardAdminODataJPAProcessor(oDataJPAContext);
    }

the CardAdminODataJPAProcessor is extend ODataJPADefaultProcessor, and I have not override
readEntitySet.

in the debug, I found the query becomes northwind\\_CLONING\\_1, instead of  northwind_CLONING_1.
I do not why we encode it. 



> can not filter the string with "_"
> ----------------------------------
>
>                 Key: OLINGO-1218
>                 URL: https://issues.apache.org/jira/browse/OLINGO-1218
>             Project: Olingo
>          Issue Type: Bug
>          Components: odata2-jpa
>    Affects Versions: V2 2.0.10
>            Reporter: Shumin Wang
>            Priority: Critical
>
> Hello, 
> when I read all entityset, the result is 
> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/">
> <id>
> https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet
> </id>
> <title type="text">CustomizedCardEntitySet</title>
> <updated>2017-12-26T07:34:05.261Z</updated>
> <author>
> <name/>
> </author>
> <link href="CustomizedCardEntitySet" rel="self" title="CustomizedCardEntitySet"/>
> <entry>
> <id>
> https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet(519L)
> </id>
> <title type="text">CustomizedCardEntitySet</title>
> <updated>2017-12-26T07:34:05.261Z</updated>
> <category term="CardAdminService.CustomizedCardEntity" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
> <link href="CustomizedCardEntitySet(519L)" rel="edit" title="CustomizedCardEntity"/>
> <content type="application/xml">
> <m:properties>
> <d:CardName>tttt</d:CardName>
> <d:CardSubtitle>Card Subtitle</d:CardSubtitle>
> <d:CardTitle>tttt</d:CardTitle>
> <d:CardType>table</d:CardType>
> <d:CreateOn>2017-12-22T06:44:24.54</d:CreateOn>
> <d:CreatorId>I036207</d:CreatorId>
> <d:CreatorName>null null</d:CreatorName>
> {color:red}<d:Destination>northwind_CLONING_1</d:Destination>{color}
> <d:Id>519</d:Id>
> <d:Metadata>
> {"serviceUri":"/","entityType":"NorthwindModel.Category","entitySet":"Categories","columns":[{"column":"CategoryID","displayName":"Column
1","columnIndex":1},{"column":"Description","displayName":"Column 2","columnIndex":2},{"column":"CategoryName","displayName":"Column
3","columnIndex":3}],"url":"","keys":[],"primarySort":{"key":"","order":""},"secondarySort":{"key":"","order":""}}
> </d:Metadata>
> <d:ModifierId>I036207</d:ModifierId>
> <d:ModifierName>null null</d:ModifierName>
> <d:UpdateOn>2017-12-22T06:44:24.54</d:UpdateOn>
> </m:properties>
> </content>
> </entry>
> </feed>
> but when I add ?$filter=(Destination%20eq%20%27northwind_CLONING_1%27), the result is
empty
> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/">
> <id>
> https://cpescockpitwebwswd3aeaa50.int.sap.hana.ondemand.com:443/cpes-cockpit-web/odata/CardAdminService.svc/CustomizedCardEntitySet
> </id>
> <title type="text">CustomizedCardEntitySet</title>
> <updated>2017-12-26T07:36:54.253Z</updated>
> <author>
> <name/>
> </author>
> <link href="CustomizedCardEntitySet" rel="self" title="CustomizedCardEntitySet"/>
> </feed>
> I have extend ODataJPAServiceFactory, in the class 
>     public ODataSingleProcessor createCustomODataProcessor(ODataJPAContext oDataJPAContext)
{
>         return new CardAdminODataJPAProcessor(oDataJPAContext);
>     }
> the CardAdminODataJPAProcessor is extend ODataJPADefaultProcessor, and I have not override
readEntitySet.
> in the debug, I found the query becomes northwind\\_CLONING\\_1, instead of  northwind_CLONING_1.
I do not why we encode it. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message