1. Home
  2. Knowledge Base
  3. FAQs
  4. Consuming the service
  5. My Project has multiple entities with the same name. How to differentiate them while invoking the service link?

My Project has multiple entities with the same name. How to differentiate them while invoking the service link?

The same name can be used for multiple entities if they are part of different modules. When all of them are added to the same project version, you must prefix them with the module name while invoking the service.

In the example below, 3 Modules have entities with the name Order. The metadata will tell you the exact name to be used while invoking the service.

multiple entities with the same name
multiple entities with the same name

https://hubwayconnect.com/HW/rest/odata/product-sales/$metadata

<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm">
<EntityContainer Name="Container">
<EntitySet Name="OSAcc_Opportunity_CS_Order" EntityType="OSAcc_Opportunity_CS.Order"/>
<EntitySet Name="OrderManagement_CS_Order" EntityType="OrderManagement_CS.Order"/>
<EntitySet Name="NorthwindDB_Order" EntityType="NorthwindDB.Order"/>
</EntityContainer>
</Schema>

The names highlighted above should be used as Entity Names while invoking the service.

For example:

https://hubwayconnect.com/HW/rest/odata/product-sales/OSAcc_Opportunity_CS.Order

https://hubwayconnect.com/HW/rest/odata/product-sales/OrderManagement_CS.Order

https://hubwayconnect.com/HW/rest/odata/product-sales/NorthwindDB.Order

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support