Skip to Content
0
Former Member
Apr 24, 2014 at 12:32 PM

Adding element in oData Model

180 Views

Hi,

i retrieve data from an OData service.

Lets say a list of emplyees.

When I want to add a new employee to my list, I have to create an Object and add it with setProperty(path+"/"counter, employee) to the branch within the model.

All properties of the object i have to code "manually", e.g.

empl = {

FIRSTNAME: "Joe",

LASTNAME: "Doe",

SAP_BUID : "0000xxx1112"

}

etc.

I wonder if there is better best practises to create an empty container based on the meta data I got?

Cheers

Jens