Subject: Feature Request: Enhanced XData Integration for Lazy Associations in TXDataWebDataSet and TWebDBLookupComboBox for WEB CORE
Context: We are developing a large-scale project featuring hundreds of forms and a multi-layered architecture. The backend is powered by a TMS Sparkle/XData server, while the web client utilizes WEB CORE - TXDataWebConnection and TXDataWebDataSet. We have specifically chosen these components over the generic TWebClient equivalents to ensure seamless, automatic integration with the XData framework.
Current Architecture: Our client-side forms utilize TXDataWebDataSet components bound to TWebDBEdit controls. To manage entity relationships, we use TWebDBLookupComboBox.
Proposed Enhancements for TXDataWebDataSet: Based on a comparative analysis with the VCL/FMX TAureliusDataset, I suggest implementing the following functionalities to improve the Web Core developer experience:
-
Model-Based Field Definitions: Allow
TXDataWebDataSetto load field definitions automatically, derived directly from the XData data model metadata. -
Support for Lazy Associations: Provide built-in management for relational data fields (Lazy associations) published via
@xdata.proxy. This should function similarly to the Internal Entity Field ("Self") found inTAureliusDataset. -
Automated Updates: Enable
TXDataWebDataSetto include@xdata.proxyassociation fields automatically inPUTandPATCHrequests, eliminating the requirement for manual JSON patching or custom boilerplate code.
Proposed Enhancement for TWebDBLookupComboBox:
- Lookup Integration: Enable
TWebDBLookupComboBoxto utilize the proposed "Self" entity field as theKeyFieldproperty when linked to aListSource, allowing for direct object-to-object mapping in the UI.
I have attached a demo comparing the functionality of TXDataWebDataSet with the existing Aurelius components for Web Core.
TMS Components XData-Aurelius-WebCore.zip (181.4 KB)
Other comments: