on 02-04-2019 7:09 AM
Hi,
I’m facing problem with metadata here. earlier we used to declare group of defining queries/requests. my service url (metadata has duplicate entity type ex: customers & CUSTOMERS) because of this i’m getting offline store exception saying
Note : CUSTOMERS & Customers are replaced by some values.
com.sap.cloud.mobile.odata.offline.OfflineODataException: :1
EntityType Error: EntityType Name=’CUSTOMERS’ collides with EntityType Name=’Customers’. Each definition must have a unique name. You can use the ALLOW_CASE_CONFLICTS option to allow names differing only in case, but preferably the schema should be changed to avoid names differing only in case.
<EntityType Name=”CUSTOMERS” sap:content-version=”1″>…
at com.sap.cloud.mobile.odata.offline.internal.OfflineODataConverter.createOfflineODataException(OfflineODataConverter.java:111)
private void setupOfflineStore() {
AndroidSystem.setContext(context);
try {
URL url = new URL(finalURL);
OfflineODataParameters offParam = new OfflineODataParameters();
offParam.setEnableRepeatableRequests(false);
offlineODataProvider = new OfflineODataProvider(url, offParam,ClientProvider.get(), null, null);
offlineODataProvider.addDefiningQuery(new OfflineODataDefiningQuery("CP", "CP", false));
} catch (OfflineODataException e) {
e.printStackTrace();
} catch (MalformedURLException e) {
e.printStackTrace();
}
openOfflineStore();
}
above code I'm using as per tutorial.
In the above I've declared only one defining query 'CP' but, I'm getting error on different entity type.
I've also setup an offline configuration to my application in Cockpit to allow case sensitive.
How to resolve this error?.
Thanks & Regards,
Hemanth.
The following might be worth a try.
myOfflineDataProvider = new OfflineODataProvider(url, offParam, myOkHttpClient, null, null);
OfflineODataServiceOptions serviceOptions = new OfflineODataServiceOptions();
serviceOptions.setCsdlOptions(com.sap.cloud.mobile.odata.csdl.CsdlOption.ALLOW_CASE_CONFLICTS);
myOfflineDataProvider.setServiceOptions(serviceOptions);
Regards,
Dan van Leeuwen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.