You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For this I implemented a getItems() method in my Favourites object instead of getPizzas()and getPastas(), which returns me dishes of type "Pizza" or "Pasta".
Now how can I implement that I can set the entry_name in the list depending on the child object.
My Favourites specification looked like this before:
items:
expose: true
accessor:
getter: getItems
xml_list:
entry_name: <pizza or pasta based on the type>
Pizza and Pasta object now has a "type" property storing "pizza" and "pasta", I did already exclude it in the child types because the structure here is given and it cannot be added as a new attribute type.
How can this be achieved?
Thanks for your help!
Best regards,
Sven
The text was updated successfully, but these errors were encountered:
Hello Johnannes,
first of all I wanted to thank you personally for the serializer. We are using it successfully in 2 projects and really love it.
Currently I am facing a problem and hope to get help here in the group.
I have a user object in which I have stored favourite dishes of the users as a list.
An example:
I need the favorite foods in a flat list now though, so in this case:
For this I implemented a getItems() method in my Favourites object instead of getPizzas()and getPastas(), which returns me dishes of type "Pizza" or "Pasta".
Now how can I implement that I can set the entry_name in the list depending on the child object.
My Favourites specification looked like this before:
The new specification now looks like this:
Pizza and Pasta object now has a "type" property storing "pizza" and "pasta", I did already exclude it in the child types because the structure here is given and it cannot be added as a new attribute type.
How can this be achieved?
Thanks for your help!
Best regards,
Sven
The text was updated successfully, but these errors were encountered: