on 08-20-2014 9:19 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.