Dropzone widget gives an error duplicate key value violates unique constraint

0
We are using dropzone widget for batch upload of multiple files (without event actions). When using this widget we encounter regularly "duplicate key value violates unique constraint" error. It is not easy to reproduce this issue, once in X times it keeps giving this error.   I’ve tried to change the Widget itself by adding delays in the code (before mx.data.create / mx.data.commit), with the idea that the server side would have more time to serve the concurrent events. But this did not help.   Does someone (Chris de Gelder) has an idea of this widget related issue?   (Seen this error is widget specific and not a native Mx button/microflow related, I expect that other workarounds mentioned at the forum are not applicable (disable during action, add blocking popup, commit autocommited objects) EDIT 1: We have explicitly committed the object before, which seems solving the problem for now.
asked
4 answers
1

This problem should be solved with the latest version, however it seem to pop up every now and then. You can try the previous version which does an explicit commit as you describe.

answered
0

Is there a one on one relation somewhere of those filedocuments? I have seen some strange behaviour when working with filedocuments and one on one relations and trying to replace an object that uses that reference. Sollution was to clear the reference first before setting the new reference.

Regards,

Ronald

 

answered
0

I had this issue as well. Using the latest version possible for mendix 7.5.1 (Dropzone 4.0 / tag 3.2).

The unique constraint error occurred in the ‘Association to context’ object. This object was not yet committed and probably got auto-committed (for every document?) when setting the association. 

I committed the object I need to set the association to on create which seems to solve the issue. On Cancel I had to remove the object myself as rollback was not working after the commit.

answered
-1

It might be related to https://forum.mendix.com/link/questions/89644 see the answer of Jaap Pulleman

answered