I've had this problem multiple times. It's an issue with JPA's List handling: JPA does not allow duplicates in a List object, which is problematic if one files contains a single chunk multiple times.
However, my current plan (and the code on my machine) gets rid of JPA entirely, so this won't be an issue anymore. I am switching to an in-memory scheme, and store the DB using my own file format.
I've had this problem multiple times. It's an issue with JPA's List handling: JPA does not allow duplicates in a List object, which is problematic if one files contains a single chunk multiple times.
However, my current plan (and the code on my machine) gets rid of JPA entirely, so this won't be an issue anymore. I am switching to an in-memory scheme, and store the DB using my own file format.