There is a test project on github that can be downloaded.
Did you map the file document object with the respective association and commit the object.
It will saved in DB.
I hope it helps
Can you please check the screenshot