cancel
Showing results for 
Search instead for 
Did you mean: 

What should be designed as entity in odata service?

Former Member
0 Kudos

Hi guys,

I'm developing an application with UI5, and I'm designing the odata service models. I'm confused what thing in my application should be designed as an entity.


e.g.

Assume I'm developing an application which search for movies.

There's a selection criteria which is the cinema(I want to see what movies are shown in which cinema ).

After user make selection for the cinema, I'll load all the movies of that cinema.

So in this application, of course, I'll design movie as entity. But what about the cinema selection criteria?

The entries in the selection criteria are also fetched from backend. Shall I also design cinema as entity?

Regards,

Aaron.

Accepted Solutions (1)

Accepted Solutions (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

As you want to select Cinema values from backend (kind of search help), you can Cinema as entity and 2nd entity as Movie

So you need to have,

Entity - Cinema, Movie

EntitySet - CinemaCollection, MovieCollection

Association and navigation between Cinema and its Movies

Accordingly develop OData service and write logic in Z*DPC_EXT methods.

Regards,

Chandra

Former Member
0 Kudos

Hi Chandrashekhar,

Thanks for your instance response.

So you mean even if the cinema is just entries in a dropdown list(IMO, it's just values, not an object).

We still need to model it as an entity?

My earlier understanding is that only those concrete objects(like movie in this application) will be modeled as entity. But I think I'm wrong here?

Regards,

Aaron.

ChandraMahajan
Active Contributor
0 Kudos

Hi Aaron,


Aaron Shen wrote:

The entries in the selection criteria are also fetched from backend. Shall I also design cinema as entity?

As you mentioned here that entries for Cinema will be fetched from backend, it is must for you to have Entity and EntitySet for Cinema. Without that how you will fill your dropdown with entries.

Regards,

Chandra

Answers (0)