File Dropper Widget - not able to upload file- getting error Error saving Files! Error!

0
Hello I have created a domain model with Entity A having 1-----* association with entity B(Entity B generalised with system.FileDocument) and set the below values. I used this widget inside Dataview of entity B. When I run the application and try to upload the file, I am getting,  Error saving Files! Error! Not sure what is going wrong. Any suggestions would be greatly appreciated. Thank you in advance.
asked
4 answers
4

Hi Manasa,

If I understand it correctly, you are putting the widget in the wrong spot. You are talking about a 1..* relation between A en B.

  • Let's say A is called Dossier, B is called Document. So a Dossier has a 1..* relation to Document
  • You put the FileDropper in a dataview for Dossier, because you are uploading Document objects for this Dossier
  • You set the File Entity in this screen to Document
  • You set the Association to context to the Dossier (over association from Document). This means that any Document you upload, will automatically get a an association to Dossier (as the 1..* association implies that the Document is the owner of the association)

 

Does this make sense?

answered
2

Found a solution that worked for me. I got this and then realized that I had a data grid as a starting point where I clicked NEW to create the context object that held the files. When you do this.. the context object is NOT COMMITTED yet. When you try to upload files, there must be a problem with trying to find an ID of the context object that causes this “unique contstraint violation” error. Once I fixed it so the context was committed, it worked

answered
1

I got the same error. Looking into the console, the problem seems to be a violation of the PRIMARY KEY constraint. What happens is that all the images are being saved at the same time and all try to create an object with the same id.

A simple solution is by deselecting the autosave option in the FileDropper properties. This will avoid the images are saved simultaneously. However, you do have to manually select each image to save it.

Probably a better solution is to add a before accept MF and simply commit each object.

 

 

answered
0

please how fixed it , explain more ? your answer

answered