@openui5/sap.ui.core 1.108.16 → 1.108.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/THIRDPARTY.txt +1 -1
  2. package/package.json +1 -1
  3. package/src/jquery.sap.global.js +1 -1
  4. package/src/jquery.sap.properties.js +1 -1
  5. package/src/jquery.sap.resources.js +1 -1
  6. package/src/jquery.sap.script.js +1 -1
  7. package/src/jquery.sap.storage.js +3 -3
  8. package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
  9. package/src/sap/base/util/restricted/_castArray.js +1 -1
  10. package/src/sap/base/util/restricted/_compact.js +1 -1
  11. package/src/sap/base/util/restricted/_curry.js +1 -1
  12. package/src/sap/base/util/restricted/_debounce.js +1 -1
  13. package/src/sap/base/util/restricted/_difference.js +1 -1
  14. package/src/sap/base/util/restricted/_differenceBy.js +1 -1
  15. package/src/sap/base/util/restricted/_differenceWith.js +1 -1
  16. package/src/sap/base/util/restricted/_flatMap.js +1 -1
  17. package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
  18. package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
  19. package/src/sap/base/util/restricted/_flatten.js +1 -1
  20. package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
  21. package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
  22. package/src/sap/base/util/restricted/_intersection.js +1 -1
  23. package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
  24. package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
  25. package/src/sap/base/util/restricted/_isEqual.js +1 -1
  26. package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
  27. package/src/sap/base/util/restricted/_isNil.js +1 -1
  28. package/src/sap/base/util/restricted/_max.js +1 -1
  29. package/src/sap/base/util/restricted/_merge.js +1 -1
  30. package/src/sap/base/util/restricted/_mergeWith.js +1 -1
  31. package/src/sap/base/util/restricted/_min.js +1 -1
  32. package/src/sap/base/util/restricted/_omit.js +1 -1
  33. package/src/sap/base/util/restricted/_pick.js +1 -1
  34. package/src/sap/base/util/restricted/_pickBy.js +1 -1
  35. package/src/sap/base/util/restricted/_throttle.js +1 -1
  36. package/src/sap/base/util/restricted/_toArray.js +1 -1
  37. package/src/sap/base/util/restricted/_union.js +1 -1
  38. package/src/sap/base/util/restricted/_unionBy.js +1 -1
  39. package/src/sap/base/util/restricted/_unionWith.js +1 -1
  40. package/src/sap/base/util/restricted/_uniq.js +1 -1
  41. package/src/sap/base/util/restricted/_uniqBy.js +1 -1
  42. package/src/sap/base/util/restricted/_uniqWith.js +1 -1
  43. package/src/sap/base/util/restricted/_without.js +1 -1
  44. package/src/sap/base/util/restricted/_xor.js +1 -1
  45. package/src/sap/base/util/restricted/_xorBy.js +1 -1
  46. package/src/sap/base/util/restricted/_xorWith.js +1 -1
  47. package/src/sap/base/util/restricted/_zipObject.js +1 -1
  48. package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
  49. package/src/sap/ui/Device.js +3 -3
  50. package/src/sap/ui/Global.js +4 -4
  51. package/src/sap/ui/base/Event.js +1 -1
  52. package/src/sap/ui/base/EventProvider.js +1 -1
  53. package/src/sap/ui/base/Interface.js +1 -1
  54. package/src/sap/ui/base/ManagedObject.js +1 -1
  55. package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
  56. package/src/sap/ui/base/Metadata.js +1 -1
  57. package/src/sap/ui/base/Object.js +1 -1
  58. package/src/sap/ui/base/ObjectPool.js +1 -1
  59. package/src/sap/ui/core/.library +3 -3
  60. package/src/sap/ui/core/BusyIndicator.js +1 -1
  61. package/src/sap/ui/core/Component.js +1 -1
  62. package/src/sap/ui/core/ComponentContainer.js +1 -1
  63. package/src/sap/ui/core/ComponentMetadata.js +1 -1
  64. package/src/sap/ui/core/ComponentSupport.js +1 -1
  65. package/src/sap/ui/core/Configuration.js +1 -1
  66. package/src/sap/ui/core/Control.js +1 -1
  67. package/src/sap/ui/core/Core.js +1 -1
  68. package/src/sap/ui/core/CustomData.js +1 -1
  69. package/src/sap/ui/core/DeclarativeSupport.js +1 -1
  70. package/src/sap/ui/core/Element.js +1 -1
  71. package/src/sap/ui/core/ElementMetadata.js +1 -1
  72. package/src/sap/ui/core/EnabledPropagator.js +1 -1
  73. package/src/sap/ui/core/EventBus.js +1 -1
  74. package/src/sap/ui/core/Fragment.js +1 -1
  75. package/src/sap/ui/core/HTML.js +1 -1
  76. package/src/sap/ui/core/History.js +1 -1
  77. package/src/sap/ui/core/Icon.js +1 -1
  78. package/src/sap/ui/core/IndicationColorSupport.js +1 -1
  79. package/src/sap/ui/core/IntervalTrigger.js +1 -1
  80. package/src/sap/ui/core/InvisibleMessage.js +1 -1
  81. package/src/sap/ui/core/InvisibleRenderer.js +1 -1
  82. package/src/sap/ui/core/InvisibleText.js +1 -1
  83. package/src/sap/ui/core/Item.js +1 -1
  84. package/src/sap/ui/core/LabelEnablement.js +1 -1
  85. package/src/sap/ui/core/LayoutData.js +1 -1
  86. package/src/sap/ui/core/ListItem.js +1 -1
  87. package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
  88. package/src/sap/ui/core/Locale.js +1 -1
  89. package/src/sap/ui/core/LocaleData.js +1 -1
  90. package/src/sap/ui/core/Manifest.js +1 -1
  91. package/src/sap/ui/core/Message.js +1 -1
  92. package/src/sap/ui/core/RenderManager.js +1 -1
  93. package/src/sap/ui/core/Renderer.js +1 -1
  94. package/src/sap/ui/core/ResizeHandler.js +1 -1
  95. package/src/sap/ui/core/ScrollBar.js +1 -1
  96. package/src/sap/ui/core/SeparatorItem.js +1 -1
  97. package/src/sap/ui/core/Title.js +1 -1
  98. package/src/sap/ui/core/TooltipBase.js +1 -1
  99. package/src/sap/ui/core/UIArea.js +1 -1
  100. package/src/sap/ui/core/UIComponent.js +1 -1
  101. package/src/sap/ui/core/UIComponentMetadata.js +1 -1
  102. package/src/sap/ui/core/ValueStateSupport.js +1 -1
  103. package/src/sap/ui/core/VariantLayoutData.js +1 -1
  104. package/src/sap/ui/core/XMLComposite.js +1 -1
  105. package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
  106. package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
  107. package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
  108. package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
  109. package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
  110. package/src/sap/ui/core/dnd/DragInfo.js +1 -1
  111. package/src/sap/ui/core/dnd/DropInfo.js +1 -1
  112. package/src/sap/ui/core/format/TimezoneUtil.js +1 -1
  113. package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
  114. package/src/sap/ui/core/library.js +3 -3
  115. package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
  116. package/src/sap/ui/core/message/Message.js +1 -1
  117. package/src/sap/ui/core/message/MessageManager.js +1 -1
  118. package/src/sap/ui/core/message/MessageParser.js +1 -1
  119. package/src/sap/ui/core/message/MessageProcessor.js +1 -1
  120. package/src/sap/ui/core/messagebundle_ar.properties +1 -0
  121. package/src/sap/ui/core/messagebundle_bg.properties +1 -0
  122. package/src/sap/ui/core/messagebundle_ca.properties +1 -0
  123. package/src/sap/ui/core/messagebundle_cs.properties +1 -0
  124. package/src/sap/ui/core/messagebundle_cy.properties +1 -0
  125. package/src/sap/ui/core/messagebundle_da.properties +1 -0
  126. package/src/sap/ui/core/messagebundle_de.properties +1 -0
  127. package/src/sap/ui/core/messagebundle_el.properties +1 -0
  128. package/src/sap/ui/core/messagebundle_en.properties +1 -0
  129. package/src/sap/ui/core/messagebundle_en_GB.properties +1 -0
  130. package/src/sap/ui/core/messagebundle_en_US_saprigi.properties +1 -0
  131. package/src/sap/ui/core/messagebundle_es.properties +1 -0
  132. package/src/sap/ui/core/messagebundle_es_MX.properties +1 -0
  133. package/src/sap/ui/core/messagebundle_et.properties +1 -0
  134. package/src/sap/ui/core/messagebundle_fi.properties +1 -0
  135. package/src/sap/ui/core/messagebundle_fr.properties +3 -2
  136. package/src/sap/ui/core/messagebundle_fr_CA.properties +1 -0
  137. package/src/sap/ui/core/messagebundle_hi.properties +1 -0
  138. package/src/sap/ui/core/messagebundle_hr.properties +1 -0
  139. package/src/sap/ui/core/messagebundle_hu.properties +1 -0
  140. package/src/sap/ui/core/messagebundle_id.properties +1 -0
  141. package/src/sap/ui/core/messagebundle_it.properties +1 -0
  142. package/src/sap/ui/core/messagebundle_iw.properties +1 -0
  143. package/src/sap/ui/core/messagebundle_ja.properties +1 -0
  144. package/src/sap/ui/core/messagebundle_kk.properties +1 -0
  145. package/src/sap/ui/core/messagebundle_ko.properties +1 -0
  146. package/src/sap/ui/core/messagebundle_lt.properties +1 -0
  147. package/src/sap/ui/core/messagebundle_lv.properties +1 -0
  148. package/src/sap/ui/core/messagebundle_ms.properties +1 -0
  149. package/src/sap/ui/core/messagebundle_nl.properties +1 -0
  150. package/src/sap/ui/core/messagebundle_no.properties +1 -0
  151. package/src/sap/ui/core/messagebundle_pl.properties +1 -0
  152. package/src/sap/ui/core/messagebundle_pt.properties +1 -0
  153. package/src/sap/ui/core/messagebundle_pt_PT.properties +1 -0
  154. package/src/sap/ui/core/messagebundle_ro.properties +1 -0
  155. package/src/sap/ui/core/messagebundle_ru.properties +3 -2
  156. package/src/sap/ui/core/messagebundle_sh.properties +1 -0
  157. package/src/sap/ui/core/messagebundle_sk.properties +1 -0
  158. package/src/sap/ui/core/messagebundle_sl.properties +1 -0
  159. package/src/sap/ui/core/messagebundle_sv.properties +1 -0
  160. package/src/sap/ui/core/messagebundle_th.properties +1 -0
  161. package/src/sap/ui/core/messagebundle_tr.properties +1 -0
  162. package/src/sap/ui/core/messagebundle_uk.properties +20 -19
  163. package/src/sap/ui/core/messagebundle_vi.properties +1 -0
  164. package/src/sap/ui/core/messagebundle_zh_CN.properties +1 -0
  165. package/src/sap/ui/core/messagebundle_zh_TW.properties +1 -0
  166. package/src/sap/ui/core/mvc/HTMLView.js +1 -1
  167. package/src/sap/ui/core/mvc/JSONView.js +1 -1
  168. package/src/sap/ui/core/mvc/JSView.js +1 -1
  169. package/src/sap/ui/core/mvc/TemplateView.js +1 -1
  170. package/src/sap/ui/core/mvc/View.js +1 -1
  171. package/src/sap/ui/core/mvc/XMLView.js +1 -1
  172. package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
  173. package/src/sap/ui/core/plugin/LessSupport.js +1 -1
  174. package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
  175. package/src/sap/ui/core/postmessage/Bus.js +1 -1
  176. package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
  177. package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
  178. package/src/sap/ui/core/search/SearchProvider.js +1 -1
  179. package/src/sap/ui/core/service/Service.js +1 -1
  180. package/src/sap/ui/core/service/ServiceFactory.js +1 -1
  181. package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
  182. package/src/sap/ui/core/support/Plugin.js +1 -1
  183. package/src/sap/ui/core/support/Support.js +1 -1
  184. package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
  185. package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
  186. package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
  187. package/src/sap/ui/core/support/plugins/Performance.js +1 -1
  188. package/src/sap/ui/core/support/plugins/Selector.js +1 -1
  189. package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
  190. package/src/sap/ui/core/support/plugins/Trace.js +1 -1
  191. package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
  192. package/src/sap/ui/core/themes/base/base.less +4989 -174
  193. package/src/sap/ui/core/themes/base/global.less +114 -8
  194. package/src/sap/ui/core/themes/sap_hcb/global.less +114 -8
  195. package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
  196. package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
  197. package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
  198. package/src/sap/ui/core/tmpl/Template.js +1 -1
  199. package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
  200. package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
  201. package/src/sap/ui/core/util/Export.js +1 -1
  202. package/src/sap/ui/core/util/ExportCell.js +1 -1
  203. package/src/sap/ui/core/util/ExportColumn.js +1 -1
  204. package/src/sap/ui/core/util/ExportRow.js +1 -1
  205. package/src/sap/ui/core/util/ExportType.js +1 -1
  206. package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
  207. package/src/sap/ui/core/util/File.js +1 -1
  208. package/src/sap/ui/core/util/LibraryInfo.js +1 -1
  209. package/src/sap/ui/core/util/MockServer.js +1 -1
  210. package/src/sap/ui/core/util/PasteHelper.js +1 -1
  211. package/src/sap/ui/core/util/reflection/BaseTreeModifier.js +3 -1
  212. package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
  213. package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
  214. package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
  215. package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
  216. package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
  217. package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
  218. package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
  219. package/src/sap/ui/core/ws/ReadyState.js +1 -1
  220. package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
  221. package/src/sap/ui/core/ws/WebSocket.js +1 -1
  222. package/src/sap/ui/debug/ControlTree.js +1 -1
  223. package/src/sap/ui/debug/DebugEnv.js +1 -1
  224. package/src/sap/ui/debug/PropertyList.js +1 -1
  225. package/src/sap/ui/model/ClientModel.js +1 -1
  226. package/src/sap/ui/model/CompositeDataState.js +1 -1
  227. package/src/sap/ui/model/CompositeType.js +1 -1
  228. package/src/sap/ui/model/DataState.js +1 -1
  229. package/src/sap/ui/model/MetaModel.js +1 -1
  230. package/src/sap/ui/model/Model.js +1 -1
  231. package/src/sap/ui/model/SelectionModel.js +1 -1
  232. package/src/sap/ui/model/SimpleType.js +1 -1
  233. package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
  234. package/src/sap/ui/model/Type.js +1 -1
  235. package/src/sap/ui/model/json/JSONModel.js +1 -1
  236. package/src/sap/ui/model/message/MessageModel.js +1 -1
  237. package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
  238. package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
  239. package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
  240. package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
  241. package/src/sap/ui/model/odata/ODataModel.js +1 -1
  242. package/src/sap/ui/model/odata/type/Boolean.js +1 -1
  243. package/src/sap/ui/model/odata/type/Byte.js +1 -1
  244. package/src/sap/ui/model/odata/type/Currency.js +1 -1
  245. package/src/sap/ui/model/odata/type/Date.js +1 -1
  246. package/src/sap/ui/model/odata/type/DateTime.js +1 -1
  247. package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
  248. package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
  249. package/src/sap/ui/model/odata/type/DateTimeWithTimezone.js +1 -1
  250. package/src/sap/ui/model/odata/type/Decimal.js +1 -1
  251. package/src/sap/ui/model/odata/type/Double.js +1 -1
  252. package/src/sap/ui/model/odata/type/Guid.js +1 -1
  253. package/src/sap/ui/model/odata/type/Int.js +1 -1
  254. package/src/sap/ui/model/odata/type/Int16.js +1 -1
  255. package/src/sap/ui/model/odata/type/Int32.js +1 -1
  256. package/src/sap/ui/model/odata/type/Int64.js +1 -1
  257. package/src/sap/ui/model/odata/type/ODataType.js +1 -1
  258. package/src/sap/ui/model/odata/type/Raw.js +1 -1
  259. package/src/sap/ui/model/odata/type/SByte.js +1 -1
  260. package/src/sap/ui/model/odata/type/Single.js +1 -1
  261. package/src/sap/ui/model/odata/type/Stream.js +1 -1
  262. package/src/sap/ui/model/odata/type/String.js +1 -1
  263. package/src/sap/ui/model/odata/type/Time.js +1 -1
  264. package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
  265. package/src/sap/ui/model/odata/type/Unit.js +1 -1
  266. package/src/sap/ui/model/odata/v2/Context.js +1 -1
  267. package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
  268. package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
  269. package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
  270. package/src/sap/ui/model/odata/v4/Context.js +4 -3
  271. package/src/sap/ui/model/odata/v4/ODataBinding.js +65 -38
  272. package/src/sap/ui/model/odata/v4/ODataContextBinding.js +5 -4
  273. package/src/sap/ui/model/odata/v4/ODataListBinding.js +46 -7
  274. package/src/sap/ui/model/odata/v4/ODataMetaModel.js +8 -9
  275. package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
  276. package/src/sap/ui/model/odata/v4/ODataParentBinding.js +58 -27
  277. package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +5 -5
  278. package/src/sap/ui/model/odata/v4/lib/_AggregationCache.js +2 -0
  279. package/src/sap/ui/model/odata/v4/lib/_Cache.js +25 -7
  280. package/src/sap/ui/model/odata/v4/lib/_Helper.js +5 -1
  281. package/src/sap/ui/model/odata/v4/lib/_Requestor.js +1 -1
  282. package/src/sap/ui/model/odata/v4/lib/_V2MetadataConverter.js +3 -3
  283. package/src/sap/ui/model/odata/v4/lib/_V2Requestor.js +1 -1
  284. package/src/sap/ui/model/resource/ResourceModel.js +1 -1
  285. package/src/sap/ui/model/type/Boolean.js +1 -1
  286. package/src/sap/ui/model/type/Currency.js +1 -1
  287. package/src/sap/ui/model/type/Date.js +1 -1
  288. package/src/sap/ui/model/type/DateInterval.js +1 -1
  289. package/src/sap/ui/model/type/DateTime.js +1 -1
  290. package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
  291. package/src/sap/ui/model/type/FileSize.js +1 -1
  292. package/src/sap/ui/model/type/Float.js +1 -1
  293. package/src/sap/ui/model/type/Integer.js +1 -1
  294. package/src/sap/ui/model/type/String.js +1 -1
  295. package/src/sap/ui/model/type/Time.js +1 -1
  296. package/src/sap/ui/model/type/TimeInterval.js +1 -1
  297. package/src/sap/ui/model/type/Unit.js +1 -1
  298. package/src/sap/ui/model/xml/XMLModel.js +1 -1
  299. package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
  300. package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
  301. package/src/sap/ui/test/generic/TestBase.js +1 -1
  302. package/src/sap/ui/thirdparty/qunit-2.js +4 -1
  303. package/src/sap/ui/thirdparty/qunit.js +41 -11
  304. package/src/sap/ui/util/Storage.js +1 -1
@@ -398,17 +398,17 @@ sap.ui.define([
398
398
  };
399
399
 
400
400
  /**
401
- * Hook method for {@link #fetchQueryOptionsForOwnCache} to determine the query options for this
402
- * binding.
401
+ * Hook method for {@link #fetchOrGetQueryOptionsForOwnCache} to determine the query options for
402
+ * this binding.
403
403
  *
404
404
  * @param {sap.ui.model.Context} [oContext]
405
405
  * The context instance to be used for a relative binding
406
- * @returns {sap.ui.base.SyncPromise}
407
- * A promise resolving with the binding's query options
406
+ * @returns {object|undefined|sap.ui.base.SyncPromise}
407
+ * The binding's query options (if any) or a promise resolving with them
408
408
  *
409
409
  * @abstract
410
410
  * @function
411
- * @name sap.ui.model.odata.v4.ODataBinding#doFetchQueryOptions
411
+ * @name sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
412
412
  * @private
413
413
  */
414
414
 
@@ -465,7 +465,7 @@ sap.ui.define([
465
465
  }
466
466
 
467
467
  aPromises = [
468
- this.fetchQueryOptionsForOwnCache(oContext, bIgnoreParentCache),
468
+ this.fetchOrGetQueryOptionsForOwnCache(oContext, bIgnoreParentCache),
469
469
  this.oModel.oRequestor.ready()
470
470
  ];
471
471
  this.mCacheQueryOptions = undefined;
@@ -509,51 +509,79 @@ sap.ui.define([
509
509
  * @param {boolean} [bIgnoreParentCache]
510
510
  * Whether the query options of the parent cache shall be ignored and own query options are
511
511
  * determined (see {@link #fetchCache})
512
- * @returns {sap.ui.base.SyncPromise}
513
- * A promise resolving with an object having two properties:
512
+ * @returns {object|sap.ui.base.SyncPromise}
513
+ * An object having two properties (or a promise resolving with it):
514
514
  * {object} mQueryOptions - The query options to create the cache for this binding or
515
515
  * <code>undefined</code> if no cache is to be created
516
516
  * {string} sReducedPath - The binding's absolute, reduced path in the cache hierarchy
517
517
  *
518
518
  * @private
519
519
  */
520
- ODataBinding.prototype.fetchQueryOptionsForOwnCache = function (oContext, bIgnoreParentCache) {
520
+ ODataBinding.prototype.fetchOrGetQueryOptionsForOwnCache = function (oContext,
521
+ bIgnoreParentCache) {
521
522
  var bHasNonSystemQueryOptions,
522
- oQueryOptionsPromise,
523
+ vQueryOptions, // {object|undefined|sap.ui.base.SyncPromise}
523
524
  sResolvedPath = this.oModel.resolve(this.sPath, oContext),
524
525
  that = this;
525
526
 
526
527
  /*
527
- * Wraps the given query options (promise) and adds sResolvedPath so that it can be returned
528
- * by fetchQueryOptionsForOwnCache.
528
+ * Wraps the given query options and adds sReducedPath to create a result for
529
+ * #fetchOrGetQueryOptionsForOwnCache.
529
530
  *
530
- * @param {object|sap.ui.base.SyncPromise} vQueryOptions
531
- * The query options (promise)
531
+ * @param {object} [mQueryOptions]
532
+ * Map of query options, or <code>undefined</code>
533
+ * @param {boolean} [bDropEmptyObject]
534
+ * Whether an empty query options object should be replaced by <code>undefined</code>
532
535
  * @param {string} [sReducedPath=sResolvedPath]
533
536
  * The reduced path
534
- * @returns {sap.ui.base.SyncPromise}
535
- * A promise to be returned by fetchQueryOptionsForOwnCache
537
+ * @returns {object}
538
+ * A result for #fetchOrGetQueryOptionsForOwnCache
536
539
  */
537
- function wrapQueryOptions(vQueryOptions, sReducedPath) {
538
- return SyncPromise.resolve(vQueryOptions).then(function (mQueryOptions) {
539
- return {
540
- mQueryOptions : mQueryOptions,
541
- sReducedPath : sReducedPath || sResolvedPath
542
- };
543
- });
540
+ function _wrapQueryOptions(mQueryOptions, bDropEmptyObject, sReducedPath) {
541
+ if (bDropEmptyObject && mQueryOptions && _Helper.isEmptyObject(mQueryOptions)) {
542
+ mQueryOptions = undefined;
543
+ }
544
+ return {
545
+ mQueryOptions : mQueryOptions,
546
+ sReducedPath : sReducedPath || sResolvedPath
547
+ };
548
+ }
549
+
550
+ /*
551
+ * Waits for <code>vQueryOptions</code> (if needed) and then creates a result for
552
+ * #fetchOrGetQueryOptionsForOwnCache.
553
+ *
554
+ * @param {boolean} [bDropEmptyObject]
555
+ * Whether an empty query options object should be replaced by <code>undefined</code>
556
+ * @param {string} [sReducedPath=sResolvedPath]
557
+ * The reduced path
558
+ * @returns {object|sap.ui.base.SyncPromise}
559
+ * A result for #fetchOrGetQueryOptionsForOwnCache
560
+ */
561
+ function wrapQueryOptions(bDropEmptyObject, sReducedPath) {
562
+ if (vQueryOptions instanceof SyncPromise) {
563
+ if (!vQueryOptions.isFulfilled()) {
564
+ return vQueryOptions.then(function (mQueryOptions) {
565
+ return _wrapQueryOptions(mQueryOptions, bDropEmptyObject, sReducedPath);
566
+ });
567
+ }
568
+ vQueryOptions = vQueryOptions.getResult();
569
+ }
570
+
571
+ return _wrapQueryOptions(vQueryOptions, bDropEmptyObject, sReducedPath);
544
572
  }
545
573
 
546
574
  if (this.oOperation // operation binding manages its cache on its own
547
575
  || this.bRelative && !oContext // unresolved binding
548
576
  || this.isMeta()) {
549
- return wrapQueryOptions(undefined);
577
+ return _wrapQueryOptions();
550
578
  }
551
579
 
552
580
  // auto-$expand/$select and binding is a parent binding, so that it needs to wait until all
553
581
  // its child bindings know via the corresponding promise in this.aChildCanUseCachePromises
554
582
  // if they can use the parent binding's cache
555
583
  // With $$aggregation, no auto-$expand/$select is needed
556
- oQueryOptionsPromise = this.doFetchQueryOptions(oContext);
584
+ vQueryOptions = this.doFetchOrGetQueryOptions(oContext);
557
585
  if (this.oModel.bAutoExpandSelect && this.aChildCanUseCachePromises
558
586
  && !_Helper.isDataAggregation(this.mParameters)) {
559
587
  // For auto-$expand/$select, wait for query options of dependent bindings:
@@ -561,8 +589,8 @@ sap.ui.define([
561
589
  // query options promise to this binding via fetchIfChildCanUseCache.
562
590
  // The aggregated query options of this binding and its dependent bindings are available
563
591
  // in that.mAggregatedQueryOptions once all these promises are fulfilled.
564
- oQueryOptionsPromise = SyncPromise.all([
565
- oQueryOptionsPromise,
592
+ vQueryOptions = SyncPromise.all([
593
+ vQueryOptions,
566
594
  Promise.resolve().then(function () {
567
595
  return SyncPromise.all(that.aChildCanUseCachePromises);
568
596
  })
@@ -576,7 +604,7 @@ sap.ui.define([
576
604
  // parent cache is ignored or (quasi-)absolute binding
577
605
  if (bIgnoreParentCache || !this.bRelative || !oContext.fetchValue) {
578
606
  // the binding shall create its own cache
579
- return wrapQueryOptions(oQueryOptionsPromise);
607
+ return wrapQueryOptions();
580
608
  }
581
609
 
582
610
  // auto-$expand/$select: Use parent binding's cache if possible
@@ -586,28 +614,27 @@ sap.ui.define([
586
614
  return sKey[0] !== "$" || sKey[1] === "$";
587
615
  });
588
616
  if (bHasNonSystemQueryOptions) {
589
- return wrapQueryOptions(oQueryOptionsPromise);
617
+ return wrapQueryOptions();
590
618
  }
591
619
  return oContext.getBinding()
592
- .fetchIfChildCanUseCache(oContext, that.sPath, oQueryOptionsPromise,
620
+ .fetchIfChildCanUseCache(oContext, that.sPath, vQueryOptions,
593
621
  !this.mParameters) // duck typing for property binding
594
622
  .then(function (sReducedPath) {
595
- return wrapQueryOptions(sReducedPath ? undefined : oQueryOptionsPromise,
596
- sReducedPath);
623
+ if (sReducedPath) {
624
+ vQueryOptions = undefined;
625
+ }
626
+ return wrapQueryOptions(false, sReducedPath);
597
627
  });
598
628
  }
599
629
 
600
630
  // relative list or context binding with parameters which are not query options
601
631
  // (such as $$groupId)
602
- if (this.mParameters && Object.keys(this.mParameters).length) {
603
- return wrapQueryOptions(oQueryOptionsPromise);
632
+ if (this.mParameters && !_Helper.isEmptyObject(this.mParameters)) {
633
+ return wrapQueryOptions();
604
634
  }
605
635
 
606
636
  // relative binding which may have query options from UI5 filter or sorter objects
607
- return oQueryOptionsPromise.then(function (mQueryOptions) {
608
- return wrapQueryOptions(
609
- Object.keys(mQueryOptions).length ? mQueryOptions : undefined);
610
- });
637
+ return wrapQueryOptions(true);
611
638
  };
612
639
 
613
640
  /**
@@ -74,7 +74,7 @@ sap.ui.define([
74
74
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
75
75
  * @public
76
76
  * @since 1.37.0
77
- * @version 1.108.16
77
+ * @version 1.108.18
78
78
  *
79
79
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
80
80
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
@@ -729,7 +729,7 @@ sap.ui.define([
729
729
  && !oOperationMetadata.$ReturnType.$Type.startsWith("Edm.")) {
730
730
  sMetaPath += "/$Type";
731
731
  }
732
- } else if (Object.keys(mParameters).length) {
732
+ } else if (!_Helper.isEmptyObject(mParameters)) {
733
733
  throw new Error("Unsupported parameters for navigation property");
734
734
  }
735
735
 
@@ -811,9 +811,9 @@ sap.ui.define([
811
811
 
812
812
  /**
813
813
  * @override
814
- * @see sap.ui.model.odata.v4.ODataBinding#doFetchQueryOptions
814
+ * @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
815
815
  */
816
- ODataContextBinding.prototype.doFetchQueryOptions = function (oContext) {
816
+ ODataContextBinding.prototype.doFetchOrGetQueryOptions = function (oContext) {
817
817
  return this.fetchResolvedQueryOptions(oContext);
818
818
  };
819
819
 
@@ -1567,6 +1567,7 @@ sap.ui.define([
1567
1567
  if (bParentHasChanges || sResumeChangeReason) {
1568
1568
  this.mAggregatedQueryOptions = {};
1569
1569
  this.bAggregatedQueryOptionsInitial = true;
1570
+ this.mCanUseCachePromiseByChildPath = {};
1570
1571
  this.removeCachesAndMessages("");
1571
1572
  this.fetchCache(this.oContext);
1572
1573
  }
@@ -57,7 +57,7 @@ sap.ui.define([
57
57
  * @mixes sap.ui.model.odata.v4.ODataParentBinding
58
58
  * @public
59
59
  * @since 1.37.0
60
- * @version 1.108.16
60
+ * @version 1.108.18
61
61
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
62
62
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
63
63
  * @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
@@ -445,7 +445,7 @@ sap.ui.define([
445
445
  sApply = _AggregationHelper.buildApply(mParameters.$$aggregation).$apply;
446
446
  }
447
447
  this.mQueryOptions = this.oModel.buildQueryOptions(mParameters, true);
448
- this.oQueryOptionsPromise = undefined; // @see #doFetchQueryOptions
448
+ this.oQueryOptionsPromise = undefined; // @see #doFetchOrGetQueryOptions
449
449
  this.mParameters = mParameters; // store mParameters at binding after validation
450
450
  if (sApply) {
451
451
  this.mQueryOptions.$apply = sApply;
@@ -1131,7 +1131,8 @@ sap.ui.define([
1131
1131
  * @private
1132
1132
  */
1133
1133
  ODataListBinding.prototype.destroyPreviousContexts = function (aPathsToDelete) {
1134
- var mPreviousContextsByPath = this.mPreviousContextsByPath;
1134
+ var mPreviousContextsByPath = this.mPreviousContextsByPath,
1135
+ that = this;
1135
1136
 
1136
1137
  if (mPreviousContextsByPath) { // binding may have been destroyed already
1137
1138
  (aPathsToDelete || Object.keys(mPreviousContextsByPath)).forEach(function (sPath) {
@@ -1143,6 +1144,11 @@ sap.ui.define([
1143
1144
  } else {
1144
1145
  if (!oContext.isTransient()) {
1145
1146
  oContext.destroy();
1147
+ if (oContext.iIndex === undefined && that.oCache) {
1148
+ // was kept alive (or deleted)
1149
+ that.oCache.removeKeptElement(
1150
+ _Helper.getRelativePath(sPath, that.oHeaderContext.getPath()));
1151
+ }
1146
1152
  }
1147
1153
  delete mPreviousContextsByPath[sPath];
1148
1154
  }
@@ -1151,6 +1157,23 @@ sap.ui.define([
1151
1157
  }
1152
1158
  };
1153
1159
 
1160
+ /**
1161
+ * Removes and destroys the contexts with the given paths from mPreviousContextsByPaths in a
1162
+ * prerendering task.
1163
+ *
1164
+ * @param {string[]} aPathsToDelete
1165
+ * Only contexts with paths in this list except kept-alive and pending deletes are removed and
1166
+ * destroyed (transient contexts are removed only)
1167
+ *
1168
+ * @private
1169
+ */
1170
+ ODataListBinding.prototype.destroyPreviousContextsLater = function (aPathsToDelete) {
1171
+ if (aPathsToDelete.length) {
1172
+ this.oModel.addPrerenderingTask(
1173
+ this.destroyPreviousContexts.bind(this, aPathsToDelete));
1174
+ }
1175
+ };
1176
+
1154
1177
  /**
1155
1178
  * @override
1156
1179
  * @see sap.ui.model.odata.v4.ODataBinding#doCreateCache
@@ -1188,9 +1211,9 @@ sap.ui.define([
1188
1211
 
1189
1212
  /**
1190
1213
  * @override
1191
- * @see sap.ui.model.odata.v4.ODataBinding#doFetchQueryOptions
1214
+ * @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
1192
1215
  */
1193
- ODataListBinding.prototype.doFetchQueryOptions = function (oContext) {
1216
+ ODataListBinding.prototype.doFetchOrGetQueryOptions = function (oContext) {
1194
1217
  // Note: an absolute binding needs no parent context :-)
1195
1218
  var sMetaPath = oContext && _Helper.getMetaPath(oContext.getPath()),
1196
1219
  that = this;
@@ -2636,7 +2659,7 @@ sap.ui.define([
2636
2659
  ODataListBinding.prototype.inheritQueryOptions = function (mQueryOptions, oContext) {
2637
2660
  var mInheritedQueryOptions;
2638
2661
 
2639
- if (!Object.keys(this.mParameters).length) {
2662
+ if (_Helper.isEmptyObject(this.mParameters)) {
2640
2663
  // mix-in inherited static query options
2641
2664
  mInheritedQueryOptions = this.getQueryOptionsForPath("", oContext);
2642
2665
  if (mQueryOptions.$orderby && mInheritedQueryOptions.$orderby) {
@@ -2711,7 +2734,7 @@ sap.ui.define([
2711
2734
  // When suspended it matches if it already has contexts. Then its getKeepAliveContext fails.
2712
2735
  return this.mParameters.$$getKeepAliveContext && this.getResolvedPath() === sPath
2713
2736
  && (!this.isRootBindingSuspended() || this.aContexts.length
2714
- || Object.keys(this.mPreviousContextsByPath).length);
2737
+ || !_Helper.isEmptyObject(this.mPreviousContextsByPath));
2715
2738
  };
2716
2739
 
2717
2740
  /**
@@ -2760,6 +2783,21 @@ sap.ui.define([
2760
2783
  }
2761
2784
  };
2762
2785
 
2786
+ /**
2787
+ * Notification from a context that its effective keep-alive status changed.
2788
+ *
2789
+ * @param {sap.ui.model.odata.v4.Context} oContext - The context
2790
+ *
2791
+ * @private
2792
+ */
2793
+ ODataListBinding.prototype.onKeepAliveChanged = function (oContext) {
2794
+ if (!oContext.isDeleted() // data of a deleted context must remain for the exclusion filter
2795
+ && oContext.getPath() in this.mPreviousContextsByPath
2796
+ && !oContext.isKeepAlive()) {
2797
+ this.destroyPreviousContextsLater([oContext.getPath()]);
2798
+ }
2799
+ };
2800
+
2763
2801
  /**
2764
2802
  * @override
2765
2803
  * @see sap.ui.model.odata.v4.ODataBinding#refreshInternal
@@ -3683,6 +3721,7 @@ sap.ui.define([
3683
3721
  }
3684
3722
  if (this.bHasPathReductionToParent && this.oModel.bAutoExpandSelect
3685
3723
  && !this.mParameters.$$aggregation) {
3724
+ this.mCanUseCachePromiseByChildPath = {};
3686
3725
  this.sChangeReason = "AddVirtualContext"; // JIRA: CPOUI5ODATAV4-848
3687
3726
  }
3688
3727
  if (oContext.getBinding
@@ -11,7 +11,6 @@ sap.ui.define([
11
11
  "./lib/_Helper",
12
12
  "sap/base/assert",
13
13
  "sap/base/Log",
14
- "sap/base/util/isEmptyObject",
15
14
  "sap/base/util/JSTokenizer",
16
15
  "sap/base/util/ObjectPath",
17
16
  "sap/ui/base/ManagedObject",
@@ -43,11 +42,11 @@ sap.ui.define([
43
42
  "sap/ui/model/odata/type/String",
44
43
  "sap/ui/model/odata/type/TimeOfDay",
45
44
  "sap/ui/thirdparty/URI"
46
- ], function (AnnotationHelper, ValueListType, _Helper, assert, Log, isEmptyObject, JSTokenizer,
47
- ObjectPath, ManagedObject, SyncPromise, BindingMode, ChangeReason, ClientListBinding,
48
- BaseContext, ContextBinding, MetaModel, PropertyBinding, OperationMode, Boolean, Byte,
49
- EdmDate, DateTimeOffset, Decimal, Double, Guid, Int16, Int32, Int64, Raw, SByte, Single,
50
- Stream, String, TimeOfDay, URI) {
45
+ ], function (AnnotationHelper, ValueListType, _Helper, assert, Log, JSTokenizer, ObjectPath,
46
+ ManagedObject, SyncPromise, BindingMode, ChangeReason, ClientListBinding, BaseContext,
47
+ ContextBinding, MetaModel, PropertyBinding, OperationMode, Boolean, Byte, EdmDate,
48
+ DateTimeOffset, Decimal, Double, Guid, Int16, Int32, Int64, Raw, SByte, Single, Stream,
49
+ String, TimeOfDay, URI) {
51
50
  "use strict";
52
51
  /*eslint max-nested-callbacks: 0 */
53
52
 
@@ -157,7 +156,7 @@ sap.ui.define([
157
156
  * @hideconstructor
158
157
  * @public
159
158
  * @since 1.37.0
160
- * @version 1.108.16
159
+ * @version 1.108.18
161
160
  */
162
161
  ODataMetaModel = MetaModel.extend("sap.ui.model.odata.v4.ODataMetaModel", {
163
162
  constructor : constructor
@@ -1629,7 +1628,7 @@ sap.ui.define([
1629
1628
  }
1630
1629
 
1631
1630
  if (mFormatOptions) {
1632
- if (isEmptyObject(mFormatOptions)) {
1631
+ if (_Helper.isEmptyObject(mFormatOptions)) {
1633
1632
  mFormatOptions = undefined;
1634
1633
  } else if ("parseKeepsEmptyString" in mFormatOptions
1635
1634
  && oProperty.$Type !== "Edm.String") {
@@ -3273,7 +3272,7 @@ sap.ui.define([
3273
3272
 
3274
3273
  // Each reference must have contributed at least one qualifier. So if oValueListInfo
3275
3274
  // is empty, there cannot have been a reference.
3276
- if (isEmptyObject(oValueListInfo)) {
3275
+ if (_Helper.isEmptyObject(oValueListInfo)) {
3277
3276
  throw new Error("No annotation '" + sValueListReferences.slice(1) + "' for "
3278
3277
  + sPropertyPath);
3279
3278
  }
@@ -218,7 +218,7 @@ sap.ui.define([
218
218
  * @extends sap.ui.model.Model
219
219
  * @public
220
220
  * @since 1.37.0
221
- * @version 1.108.16
221
+ * @version 1.108.18
222
222
  */
223
223
  ODataModel = Model.extend("sap.ui.model.odata.v4.ODataModel",
224
224
  /** @lends sap.ui.model.odata.v4.ODataModel.prototype */{
@@ -31,6 +31,7 @@ sap.ui.define([
31
31
  this.mAggregatedQueryOptions = {};
32
32
  // whether the aggregated query options are processed the first time
33
33
  this.bAggregatedQueryOptionsInitial = true;
34
+ this.mCanUseCachePromiseByChildPath = {};
34
35
  // auto-$expand/$select: promises to wait until child bindings have provided
35
36
  // their path and query options
36
37
  this.aChildCanUseCachePromises = [];
@@ -215,7 +216,7 @@ sap.ui.define([
215
216
  * @param {object} mQueryOptions - The query options to be merged
216
217
  * @param {string} sBaseMetaPath - This binding's meta path
217
218
  * @param {boolean} bCacheImmutable - Whether the cache of this binding is immutable
218
- * @param {boolean} bIsProperty - Whether the child is a property binding
219
+ * @param {boolean} [bIsProperty] - Whether the child is a property binding
219
220
  * @returns {boolean} Whether the query options can be fulfilled by this binding
220
221
  *
221
222
  * @private
@@ -229,14 +230,19 @@ sap.ui.define([
229
230
  /*
230
231
  * Recursively merges the given query options into the given aggregated query options.
231
232
  *
232
- * @param {object} mAggregatedQueryOptions The aggregated query options
233
- * @param {object} mQueryOptions0 The query options to merge into the aggregated query
234
- * options
235
- * @param {string} sMetaPath The meta path for the current $expand
236
- * @param {boolean} [bInsideExpand] Whether the given query options are inside a $expand
237
- * @param {boolean} [bAdd] Whether to add the given query options because they are in a
238
- * $expand that has not been aggregated yet
239
- * @returns {boolean} Whether the query options can be fulfilled by this binding
233
+ * @param {object} mAggregatedQueryOptions
234
+ * The aggregated query options
235
+ * @param {object} mQueryOptions0
236
+ * The query options to merge into the aggregated query options
237
+ * @param {string} [sMetaPath]
238
+ * The meta path for the current $expand (only used if cache is immutable)
239
+ * @param {boolean} [bInsideExpand]
240
+ * Whether the given query options are inside a $expand
241
+ * @param {boolean} [bAdd]
242
+ * Whether to add the given query options because they are in a $expand that has not been
243
+ * aggregated yet
244
+ * @returns {boolean}
245
+ * Whether the query options can be fulfilled by this binding
240
246
  */
241
247
  function merge(mAggregatedQueryOptions, mQueryOptions0, sMetaPath, bInsideExpand, bAdd) {
242
248
  /*
@@ -306,10 +312,13 @@ sap.ui.define([
306
312
  }
307
313
 
308
314
  if (merge(mAggregatedQueryOptionsClone, mQueryOptions, sBaseMetaPath)) {
309
- if (!bCacheImmutable) {
310
- this.mAggregatedQueryOptions = mAggregatedQueryOptionsClone;
311
- } else {
315
+ if (bCacheImmutable) {
312
316
  this.mLateQueryOptions = mAggregatedQueryOptionsClone;
317
+ } else {
318
+ this.mAggregatedQueryOptions = mAggregatedQueryOptionsClone;
319
+ if (this.mLateQueryOptions) {
320
+ merge(this.mLateQueryOptions, mQueryOptions);
321
+ }
313
322
  }
314
323
  return true;
315
324
  }
@@ -660,14 +669,14 @@ sap.ui.define([
660
669
  * @param {sap.ui.model.odata.v4.Context} oContext
661
670
  * A context of this binding which is the direct or indirect parent of the child binding.
662
671
  * Initially it is the child binding's parent context (See
663
- * {@link sap.ui.model.odata.v4.ODataBinding#fetchQueryOptionsForOwnCache}). When a binding
664
- * delegates up to its parent binding, it passes its own parent context adjusting
672
+ * {@link sap.ui.model.odata.v4.ODataBinding#fetchOrGetQueryOptionsForOwnCache}). When a
673
+ * binding delegates up to its parent binding, it passes its own parent context adjusting
665
674
  * <code>sChildPath</code> accordingly.
666
675
  * @param {string} sChildPath
667
676
  * The child binding's binding path relative to <code>oContext</code>
668
- * @param {object|sap.ui.base.SyncPromise} vChildQueryOptions
669
- * The child binding's (aggregated) query options or a promise resolving with them
670
- * @param {boolean} bIsProperty
677
+ * @param {object|sap.ui.base.SyncPromise} [vChildQueryOptions={}]
678
+ * The child binding's (aggregated) query options (if any) or a promise resolving with them
679
+ * @param {boolean} [bIsProperty]
671
680
  * Whether the child is a property binding
672
681
  * @returns {sap.ui.base.SyncPromise}
673
682
  * A promise resolved with the reduced path for the child binding if the child binding can use
@@ -682,7 +691,7 @@ sap.ui.define([
682
691
  // getBaseForPathReduction must be called early, because the (virtual) parent context may be
683
692
  // lost again when the path is needed
684
693
  var sBaseForPathReduction = this.getBaseForPathReduction(),
685
- sBaseMetaPath = _Helper.getMetaPath(oContext.getPath()),
694
+ sBaseMetaPath,
686
695
  bCacheImmutable,
687
696
  oCanUseCachePromise,
688
697
  // whether this binding is an operation or depends on one
@@ -737,6 +746,23 @@ sap.ui.define([
737
746
  return SyncPromise.resolve(sResolvedChildPath);
738
747
  }
739
748
 
749
+ oCanUseCachePromise = this.mCanUseCachePromiseByChildPath[sChildPath];
750
+ if (oCanUseCachePromise && bIsProperty) {
751
+ return oCanUseCachePromise.then(function (sOldReducedPath) {
752
+ if (!sOldReducedPath) {
753
+ return undefined;
754
+ }
755
+ // Note: sResolvedChildPath could be "/SalesOrderList('42')/SO_2_SOITEM/0/Note"
756
+ // w/ index (thus getMetaPath helps), but getStrippedMetaPath makes no difference
757
+ if (!sChildPath.includes("/")
758
+ || _Helper.getMetaPath(sOldReducedPath)
759
+ === _Helper.getMetaPath(sResolvedChildPath)) {
760
+ return sResolvedChildPath;
761
+ }
762
+ return oMetaModel.getReducedPath(sResolvedChildPath, sBaseForPathReduction);
763
+ });
764
+ }
765
+
740
766
  // Note: this.oCachePromise exists for all bindings except operation bindings; it might
741
767
  // become pending again
742
768
  bCacheImmutable = this.oCachePromise.isRejected()
@@ -744,16 +770,17 @@ sap.ui.define([
744
770
  || oContext.isKeepAlive() // kept-alive contexts have no index when not in aContexts
745
771
  || this.oCache === null
746
772
  || this.oCache && this.oCache.hasSentRequest();
773
+ sBaseMetaPath = _Helper.getMetaPath(oContext.getPath());
747
774
  aPromises = [
748
- this.doFetchQueryOptions(this.oContext),
775
+ this.doFetchOrGetQueryOptions(this.oContext),
749
776
  // After access to complete meta path of property, the metadata of all prefix paths
750
777
  // is loaded so that synchronous access in wrapChildQueryOptions via getObject is
751
- // possible
778
+ // possible - as well as #getReducedPath
752
779
  fetchPropertyAndType(),
753
780
  vChildQueryOptions
754
781
  ];
755
782
  oCanUseCachePromise = SyncPromise.all(aPromises).then(function (aResult) {
756
- var mChildQueryOptions = aResult[2],
783
+ var mChildQueryOptions = aResult[2] || {},
757
784
  mWrappedChildQueryOptions,
758
785
  mLocalQueryOptions = aResult[0],
759
786
  oProperty = aResult[1],
@@ -774,7 +801,7 @@ sap.ui.define([
774
801
  that.bHasPathReductionToParent = true;
775
802
  return that.oContext.getBinding().fetchIfChildCanUseCache(that.oContext,
776
803
  _Helper.getRelativePath(sResolvedChildPath, that.oContext.getPath()),
777
- vChildQueryOptions);
804
+ mChildQueryOptions, bIsProperty);
778
805
  }
779
806
 
780
807
  if (bDependsOnOperation || sReducedChildMetaPath === "$count"
@@ -823,8 +850,8 @@ sap.ui.define([
823
850
  if (that.oCache) {
824
851
  that.oCache.setLateQueryOptions(that.mLateQueryOptions);
825
852
  } else if (that.oCache === null) {
826
- return that.oContext.getBinding().fetchIfChildCanUseCache(that.oContext,
827
- that.sPath, SyncPromise.resolve(that.mLateQueryOptions))
853
+ return that.oContext.getBinding()
854
+ .fetchIfChildCanUseCache(that.oContext, that.sPath, that.mLateQueryOptions)
828
855
  .then(function (sPath) {
829
856
  return sPath && sReducedPath;
830
857
  });
@@ -832,6 +859,9 @@ sap.ui.define([
832
859
  }
833
860
  return sReducedPath;
834
861
  });
862
+ if (bIsProperty && !oContext.getPath().includes("($uid=")) {
863
+ this.mCanUseCachePromiseByChildPath[sChildPath] = oCanUseCachePromise;
864
+ }
835
865
  this.aChildCanUseCachePromises.push(oCanUseCachePromise);
836
866
  this.oCachePromise = SyncPromise.all([this.oCachePromise, oCanUseCachePromise])
837
867
  .then(function (aResult) {
@@ -857,6 +887,7 @@ sap.ui.define([
857
887
  that.oModel.reportError(that + ": Failed to enhance query options for "
858
888
  + "auto-$expand/$select for child " + sChildPath, sClassName, oError);
859
889
  });
890
+
860
891
  return oCanUseCachePromise;
861
892
  };
862
893
 
@@ -980,7 +1011,7 @@ sap.ui.define([
980
1011
  * @private
981
1012
  */
982
1013
  ODataParentBinding.prototype.getQueryOptionsForPath = function (sPath, oContext) {
983
- if (Object.keys(this.mParameters).length) {
1014
+ if (!_Helper.isEmptyObject(this.mParameters)) {
984
1015
  // binding has parameters -> all query options need to be defined at the binding
985
1016
  return _Helper.getQueryOptionsForPath(this.getQueryOptionsFromParameters(), sPath);
986
1017
  }
@@ -1009,8 +1040,8 @@ sap.ui.define([
1009
1040
  * @function
1010
1041
  * @name sap.ui.model.odata.v4.ODataParentBinding.getQueryOptionsFromParameters
1011
1042
  * @private
1012
- * @see sap.ui.model.odata.v4.ODataBinding#fetchQueryOptionsForOwnCache
1013
- * @see sap.ui.model.odata.v4.ODataBinding#doFetchQueryOptions
1043
+ * @see sap.ui.model.odata.v4.ODataBinding#fetchOrGetQueryOptionsForOwnCache
1044
+ * @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
1014
1045
  */
1015
1046
 
1016
1047
  /**
@@ -42,7 +42,7 @@ sap.ui.define([
42
42
  * @mixes sap.ui.model.odata.v4.ODataBinding
43
43
  * @public
44
44
  * @since 1.37.0
45
- * @version 1.108.16
45
+ * @version 1.108.18
46
46
  * @borrows sap.ui.model.odata.v4.ODataBinding#getGroupId as #getGroupId
47
47
  * @borrows sap.ui.model.odata.v4.ODataBinding#getRootBinding as #getRootBinding
48
48
  * @borrows sap.ui.model.odata.v4.ODataBinding#getUpdateGroupId as #getUpdateGroupId
@@ -103,7 +103,7 @@ sap.ui.define([
103
103
  this.mQueryOptions = this.oModel.buildQueryOptions(_Helper.clone(mParameters),
104
104
  /*bSystemQueryOptionsAllowed*/sPath.endsWith("$count"));
105
105
  this.vValue = undefined;
106
- // BEWARE: #doFetchQueryOptions uses #isRoot which relies on this.oContext!
106
+ // BEWARE: #doFetchOrGetQueryOptions uses #isRoot which relies on this.oContext!
107
107
  this.fetchCache(oContext);
108
108
  oModel.bindingCreated(this);
109
109
  }
@@ -401,10 +401,10 @@ sap.ui.define([
401
401
 
402
402
  /**
403
403
  * @override
404
- * @see sap.ui.model.odata.v4.ODataBinding#doFetchQueryOptions
404
+ * @see sap.ui.model.odata.v4.ODataBinding#doFetchOrGetQueryOptions
405
405
  */
406
- ODataPropertyBinding.prototype.doFetchQueryOptions = function () {
407
- return this.isRoot() ? SyncPromise.resolve(this.mQueryOptions) : SyncPromise.resolve({});
406
+ ODataPropertyBinding.prototype.doFetchOrGetQueryOptions = function () {
407
+ return this.isRoot() ? this.mQueryOptions : undefined;
408
408
  };
409
409
 
410
410
  /**
@@ -41,6 +41,7 @@ sap.ui.define([
41
41
  * Whether a grand total is needed
42
42
  *
43
43
  * @alias sap.ui.model.odata.v4.lib._AggregationCache
44
+ * @borrows sap.ui.model.odata.v4.lib._CollectionCache#removeKeptElement as #removeKeptElement
44
45
  * @constructor
45
46
  * @extends sap.ui.model.odata.v4.lib._Cache
46
47
  * @private
@@ -73,6 +74,7 @@ sap.ui.define([
73
74
  });
74
75
  }
75
76
  this.oFirstLevel = this.createGroupLevelCache(null, bHasGrandTotal || !!fnLeaves);
77
+ this.removeKeptElement = this.oFirstLevel.removeKeptElement; // @borrows ...
76
78
  this.oGrandTotalPromise = undefined;
77
79
  if (bHasGrandTotal) {
78
80
  this.oGrandTotalPromise = new SyncPromise(function (resolve) {