Master-detail and cached updates
Master-detail and cached updates
Hi to all,
I'm trying to set up a suite of tests with both FireDAC and UniDAC and am now testing the use of master-detail configurations. Without CachedUpdates I was able to get everything to work... inserts, updates and deletes.
But with CachedUpdates activated there are several things that I cannot wrap my head around:
1) I have to explicitly set Autoinc values client side, as it seems UniDAC is depending on server side calculation... and obviously this is needed in case I try to insert a master row, then insert one or more detail rows, and then apply the updates.
2) Foreign key violations when I apply a delete of a master row and all its detail rows. I presume this happens because it does not apply the deletes to the detail query before applying the delete to the master row.
Now... the second point is really blocking me. Of course inserts, updates and deletes must be applied in a specific order if the database has foreign keys. But I really cannot keep track of which updates have been made to the envolved datasets. That should be responsibility of the DAC layer. Am I missing something? Is there some work-around or specific setup I must use?
Thanks and regards,
Marco
I'm trying to set up a suite of tests with both FireDAC and UniDAC and am now testing the use of master-detail configurations. Without CachedUpdates I was able to get everything to work... inserts, updates and deletes.
But with CachedUpdates activated there are several things that I cannot wrap my head around:
1) I have to explicitly set Autoinc values client side, as it seems UniDAC is depending on server side calculation... and obviously this is needed in case I try to insert a master row, then insert one or more detail rows, and then apply the updates.
2) Foreign key violations when I apply a delete of a master row and all its detail rows. I presume this happens because it does not apply the deletes to the detail query before applying the delete to the master row.
Now... the second point is really blocking me. Of course inserts, updates and deletes must be applied in a specific order if the database has foreign keys. But I really cannot keep track of which updates have been made to the envolved datasets. That should be responsibility of the DAC layer. Am I missing something? Is there some work-around or specific setup I must use?
Thanks and regards,
Marco
Re: Master-detail and cached updates
Thank you for the information. Please specify what database you use UniDAC with. Perhaps, you will be able to draw up and send a small example that demonstrates the behavior you described via the e-support form (https://www.devart.com - the menu "Support" \ "Request Support")
Re: Master-detail and cached updates
Thank you Maxim. I did that. I'm just sorry that my trial is almost over (2 days left) and I don't think I'll be able to see how this solved.
Marco
Marco
Re: Master-detail and cached updates
We always try to help each our client. However, in case if according to the user's description, we cannot understand what the problem is, we ask for more information. Only after reproducing the problem we can we make any further decision. In addition, there are situations when the process of reproducing the error with its subsequent fix takes a long time. Therefore, in some cases, we can extend the trial period of our products so that our potential customers can perform quality testing in their environment. Please try to provide more information about this problem and let us know if you need an additional trial period of using UniDAC. You can do this using the e-support form (https://www.devart.com - the "Support"\"Request Support" menu).
Re: Master-detail and cached updates
As I said... I was able to provide a very small project that reproduces the 2 problems (on SQLite database) and I have uploaded it through the Request Support page. I did this on friday. I hope you get around to having a look at it and I would like to know if this can be solved. I think the project source is small and clear enough. In case I can provide more details.
As for the trial license, it has expired yesterday, and so for now I have had to suspend the tests on UniDAC. An extension would be nice. In the meantime I am investigating within my firm to see if they are willing to buy UniDAC and use it in our projects even though there are these problems to address. The biggest issue seems to be that there are still some unexplored and untested features... especially the connect to SQLite and MySQL remote database from mobile (Android) platform, which is what got us stuck on FireDAC.
As for the trial license, it has expired yesterday, and so for now I have had to suspend the tests on UniDAC. An extension would be nice. In the meantime I am investigating within my firm to see if they are willing to buy UniDAC and use it in our projects even though there are these problems to address. The biggest issue seems to be that there are still some unexplored and untested features... especially the connect to SQLite and MySQL remote database from mobile (Android) platform, which is what got us stuck on FireDAC.
Re: Master-detail and cached updates
Unfortunately, we did not receive any message from you via the e-support service. Please try to send your description to the following email maximg*devart*com
Re: Master-detail and cached updates
Hi Maxim,
I sent you the mail with the small test project. I hope you received it.
Marco
I sent you the mail with the small test project. I hope you received it.
Marco
Re: Master-detail and cached updates
Thank you for the sample. We received it and started its investigation. We will inform you about the results shortly