-
Proposal:
Hide
PUT or PATCH to a single-valued navigation property reference (i.e., customers/salesperson/$ref) MUST only include the entity id, and changes which entity is referenced by the navigation property.
PUT or PATCH to a single-valued navigation property (i.e., customers/salesperson) performs an update on the currently related resource. If the value of the navigation property is non-null then any key values are ignored and the referenced entity is updated. If the value of the navigation property is null, for a containment relationship a resource is created (since the single-valued navigation path identifies the resource). For a non-containment relationship, PUT or PATCH to a null single-valued navigation property returns an error.
The same semantics apply to singletons on the entity container, which are semantically contained single value navigation properties.
Show
PUT or PATCH to a single-valued navigation property reference (i.e., customers/salesperson/$ref) MUST only include the entity id, and changes which entity is referenced by the navigation property.
PUT or PATCH to a single-valued navigation property (i.e., customers/salesperson) performs an update on the currently related resource. If the value of the navigation property is non-null then any key values are ignored and the referenced entity is updated. If the value of the navigation property is null, for a containment relationship a resource is created (since the single-valued navigation path identifies the resource). For a non-containment relationship, PUT or PATCH to a null single-valued navigation property returns an error.
The same semantics apply to singletons on the entity container, which are semantically contained single value navigation properties.
-
Resolution:
Show
https://www.oasis-open.org/committees/download.php/64119/odata-v4.01-wd06-part1-protocol-2018-10-19.docx
Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection.
This question also arises in the context of "deep update" with nested entities for single-valued navigation.
{"report":{"apdex":1,"isInitial":true,"journeyId":"33cf42f2-90bf-48cd-922e-f6b1149f0fd0","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":609.4000000953674,"redirectCount":0,"resourceLoadedEnd":650.3000001907349,"resourceLoadedStart":149.80000019073486,"resourceTiming":[{"duration":76.69999980926514,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":149.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":149.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":226.5,"responseStart":0,"secureConnectionStart":0},{"duration":76.90000009536743,"initiatorType":"link","name":"https://issues.oasis-open.org/s/7d2823769c2e7b66e860863fe879b7f8-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&richediton=true","startTime":150.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":227,"responseStart":0,"secureConnectionStart":0},{"duration":77.5,"initiatorType":"link","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.css","startTime":150.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":227.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":77.80000019073486,"initiatorType":"link","name":"https://issues.oasis-open.org/s/645acc233eb869f48a571293b8358a7d-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static-adgs/jira.webresources:global-static-adgs.css","startTime":150.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":228.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":78.7999997138977,"initiatorType":"link","name":"https://issues.oasis-open.org/s/a0dd6509771c1de0667aae5429c04cda-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static/jira.webresources:global-static.css","startTime":150.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":229.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":120.5,"initiatorType":"script","name":"https://issues.oasis-open.org/s/e5479157e7a0c08b005e6522f2f04104-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":151,"connectEnd":151,"connectStart":151,"domainLookupEnd":151,"domainLookupStart":151,"fetchStart":151,"redirectEnd":0,"redirectStart":0,"requestStart":151,"responseEnd":271.5,"responseStart":271.5,"secureConnectionStart":151},{"duration":160,"initiatorType":"script","name":"https://issues.oasis-open.org/s/83514d5d4e8543747b02042eafcdc99c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":151.5,"connectEnd":151.5,"connectStart":151.5,"domainLookupEnd":151.5,"domainLookupStart":151.5,"fetchStart":151.5,"redirectEnd":0,"redirectStart":0,"requestStart":151.5,"responseEnd":311.5,"responseStart":311.5,"secureConnectionStart":151.5},{"duration":162.40000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/70bb2263e59e7e1f04fbd137c80b895b-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":151.69999980926514,"connectEnd":151.69999980926514,"connectStart":151.69999980926514,"domainLookupEnd":151.69999980926514,"domainLookupStart":151.69999980926514,"fetchStart":151.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":151.69999980926514,"responseEnd":314.09999990463257,"responseStart":314.09999990463257,"secureConnectionStart":151.69999980926514},{"duration":162.7999997138977,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":151.90000009536743,"connectEnd":151.90000009536743,"connectStart":151.90000009536743,"domainLookupEnd":151.90000009536743,"domainLookupStart":151.90000009536743,"fetchStart":151.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":151.90000009536743,"responseEnd":314.69999980926514,"responseStart":314.69999980926514,"secureConnectionStart":151.90000009536743},{"duration":163,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":152.09999990463257,"connectEnd":152.09999990463257,"connectStart":152.09999990463257,"domainLookupEnd":152.09999990463257,"domainLookupStart":152.09999990463257,"fetchStart":152.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":152.09999990463257,"responseEnd":315.09999990463257,"responseStart":315.09999990463257,"secureConnectionStart":152.09999990463257},{"duration":163.09999990463257,"initiatorType":"script","name":"https://issues.oasis-open.org/s/cda37faab827dbdf305de8efe8282062-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.js?locale=en-US","startTime":152.30000019073486,"connectEnd":152.30000019073486,"connectStart":152.30000019073486,"domainLookupEnd":152.30000019073486,"domainLookupStart":152.30000019073486,"fetchStart":152.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":152.30000019073486,"responseEnd":315.40000009536743,"responseStart":315.40000009536743,"secureConnectionStart":152.30000019073486},{"duration":262.09999990463257,"initiatorType":"link","name":"https://issues.oasis-open.org/s/07245784f53abc49bad9d9d4d36c577a-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/cadc4f20cc5c138dee060d42cf85f220/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":152.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":152.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":163.2000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":152.69999980926514,"connectEnd":152.69999980926514,"connectStart":152.69999980926514,"domainLookupEnd":152.69999980926514,"domainLookupStart":152.69999980926514,"fetchStart":152.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":152.69999980926514,"responseEnd":315.90000009536743,"responseStart":315.90000009536743,"secureConnectionStart":152.69999980926514},{"duration":235.39999961853027,"initiatorType":"link","name":"https://issues.oasis-open.org/s/f77fd89aa211a76b20e9b0e63564383c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":179.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":179.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":137,"initiatorType":"script","name":"https://issues.oasis-open.org/s/41525c48ddceeb9b11e54085268fc285-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":179.5,"connectEnd":179.5,"connectStart":179.5,"domainLookupEnd":179.5,"domainLookupStart":179.5,"fetchStart":179.5,"redirectEnd":0,"redirectStart":0,"requestStart":179.5,"responseEnd":316.5,"responseStart":316.5,"secureConnectionStart":179.5},{"duration":354.7999997138977,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":189.40000009536743,"connectEnd":189.40000009536743,"connectStart":189.40000009536743,"domainLookupEnd":189.40000009536743,"domainLookupStart":189.40000009536743,"fetchStart":189.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":189.40000009536743,"responseEnd":544.1999998092651,"responseStart":544.1999998092651,"secureConnectionStart":189.40000009536743},{"duration":335.5,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":209.90000009536743,"connectEnd":209.90000009536743,"connectStart":209.90000009536743,"domainLookupEnd":209.90000009536743,"domainLookupStart":209.90000009536743,"fetchStart":209.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":209.90000009536743,"responseEnd":545.4000000953674,"responseStart":545.4000000953674,"secureConnectionStart":209.90000009536743},{"duration":61.90000009536743,"initiatorType":"xmlhttprequest","name":"https://issues.oasis-open.org/rest/webResources/1.0/resources","startTime":426.19999980926514,"connectEnd":426.19999980926514,"connectStart":426.19999980926514,"domainLookupEnd":426.19999980926514,"domainLookupStart":426.19999980926514,"fetchStart":426.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":426.19999980926514,"responseEnd":488.09999990463257,"responseStart":488.09999990463257,"secureConnectionStart":426.19999980926514}],"threshold":1000,"fetchStart":0,"domainLookupStart":47,"domainLookupEnd":47,"connectStart":47,"connectEnd":95,"secureConnectionStart":71,"requestStart":95,"responseStart":142,"responseEnd":209,"domLoading":145,"domInteractive":687,"domContentLoadedEventStart":687,"domContentLoadedEventEnd":745,"domComplete":793,"loadEventStart":793,"loadEventEnd":795,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"22291c52da0951","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":82,"dbReadsTimeInMs":10,"dbConnsTimeInMs":12,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
George: for server-generated keys: if key is provided, relate and update target, otherwise create and relate new target entity