Nested master/detail data access

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Brent Rose
Posts: 2
Joined: Mon 09 Dec 2019 20:14

Nested master/detail data access

Post by Brent Rose » Mon 09 Dec 2019 21:01

I am looking at using UniDAC at this stage - and would like some help understanding how it works with m/d data.

I see that by using LocalMasterDetail = True, ALL the detail data for a set of master records can be retrieved at once without having to subsequently retrieve more data from the server as master records are scrolled.

a) Does the "local" mode support multiple levels of m/d data. ie Can I treat a detail record as the master for another set of detail records and so on to multiple levels. If so, is there a limit to how many nested levels?

b) When posting changes, does posting the top level master record also post any dependent detail record currently in edit mode (potentially to multiple nested levels)?

c) When the data is cached, does ApplyUpdates for the top level master dataset also apply changes for the detail datasets (potentially to multiple levels)? I do note the documentation stating that calling ApplyUpdates of the connection component will commit all pending changes for all datasets using that connection, whether they be m/d or "stand alone"

Thank you for considering these questions. Any help will be appreciated.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Nested master/detail data access

Post by MaximG » Mon 13 Jan 2020 09:41

You can use any number of nesting levels to implement "master-detail" relationship when using the LocalMasterDetail option. Note that handling of any data changes, as shown in your example, will be completely defined by the business logic of your application and won't depend in any way on our data access components, such as UniDAC.

Post Reply