(moving to the dev list)
I believe that POSTing a new value for a collection property of a resource
should overwrite it, yes.
E.g. doing this should *set* the childLocations, not add to the existing
list: POST location/1234 { childLocations: [ a, b, c ] }
For purely-dependent properties, we also explicitly expose the collection
as a subresource (e.g. person/<uuid>/personname), which allows for adding
and removing individual elements without overwriting the collection.
I guess that means that any collection property *without* a subresource is
a collection of links to other resources. (I can't think of any examples
where we have collections of non-resources.) Each of these should get unit
tests, and if the relationships are bidirectional, that should be tested
there.
-Darius
On Thu, Apr 19, 2012 at 9:59 AM, Friedman, Roger (CDC/CGH/DGHA) (CTR) <
[email protected]> wrote:
> Just want to make sure that this is the desired behavior for updating.***
> *
>
> Note that in many-to-many relationships, deleting a member of the
> collection will also invalidate the corresponding collection on the other
> side of the relationship, so that will have to be refreshed.****
>
> ** **
>
> *From:* Rafal Korytkowski (Commented) (JIRA) [mailto:
> [email protected]]
> *Sent:* Thursday, April 19, 2012 12:50 PM
> *To:* Friedman, Roger (CDC/CGH/DGHA) (CTR)
> *Subject:* [OPENMRS-JIRA] (RESTWS-226) Resources need to specify what
> fields are editable, not blindly expose all delegate properties****
>
> ** **
>
> ****
>
> ****Rafal
> Korytkowski<https://tickets.openmrs.org/secure/ViewProfile.jspa?name=raff>commented
> on [image:
> New Feature]RESTWS-226 <https://tickets.openmrs.org/browse/RESTWS-226> ***
> *
>
> *Resources need to specify what fields are editable, not blindly expose
> all delegate properties* <https://tickets.openmrs.org/browse/RESTWS-226> *
> ***
>
> For anyone working on a subtask of this ticket:****
>
> - Find and remove
> @Ignore("RESTWS-2<https://tickets.openmrs.org/browse/RESTWS-2>
> ...****
> - Make it pass****
> - Write additional tests for any collection properties to make sure
> that collections are overwritten and not merged while updating****
>
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators<https://tickets.openmrs.org/secure/ContactAdministrators!default.jspa>
> .
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> ** **
>
> ** **
>
_________________________________________
To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to
[email protected] with "SIGNOFF openmrs-devel-l" in the body (not
the subject) of your e-mail.
[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]