You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by AndresS FTW <le...@gmail.com> on 2016/07/15 20:00:41 UTC
Persist Parent and childrens
Hi dan.
How i can pesist whit rest api a entity than contains a collections of
entitities
for example:
i have a entity name Entity named "Company" and other named "Employee"
i need to call the createCompany(domainService) rest api and send the
company and inside it a collection of employees that not exist yet in
database,
i mean create the company and employees in one transaction.
i tried to set the collection in create method as parameter but when i
deploy then isis make errors,
Regards.
Re: Persist Parent and childrens
Posted by Jeroen van der Wal <je...@stromboli.it>.
Hi Andres, welcome to this list!
The default REST implementation is following the Restful Objects
specification [1] and does not support collections as action parameters.
The workaround is to merge the collection in a single string and then parse
it server-side.
HTH
PS Collections as parameters is high on the wish list [2]
[1] http://www.restfulobjects.org
[2] https://issues.apache.org/jira/browse/ISIS-785
On 15 July 2016 at 22:00, AndresS FTW <le...@gmail.com> wrote:
> Hi dan.
>
> How i can pesist whit rest api a entity than contains a collections of
> entitities
>
> for example:
>
> i have a entity name Entity named "Company" and other named "Employee"
>
> i need to call the createCompany(domainService) rest api and send the
> company and inside it a collection of employees that not exist yet in
> database,
>
> i mean create the company and employees in one transaction.
>
> i tried to set the collection in create method as parameter but when i
> deploy then isis make errors,
>
> Regards.
>