Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Undefined Entity Type Exception Kotlin

1,027

Hi,

Can anyone help to fix the following issue.

I am getting "undefined entity type exception" when i try to fetch data from offline odata. Write operation is is working properly.

com.sap.cloud.mobile.odata.json.JsonException; Caused by: com.sap.cloud.mobile.odata.core.UndefinedException: Undefined entity type: mm_my_service_srv.Customer.

Entity set Name : Customers

Entity Type :Customer

This issue occurs when there is records in the Entity and after declaring Entity in OfflineODataProvider as "addDefiningQuery("Customers","Customers",false)

If i remove AddDefiningQuery("Customers","Customers",false) then it returns empty result. Please Help.

Thanks in advance.

1 REPLY 1
Read only

evanireland
Product and Topic Expert
Product and Topic Expert
0 Likes
827

A full stack trace would help, and the metadata (at least the "Schema" element showing the Namespace attribute) and the EntityType definition.