The problem is I have 5 tables and each can have many documents per entity. I solved this with a table "docpool". For every new entity in one of the 5 tables I generate a docpool entity (only the ID) and put the docpool.id into the entity. Each document is linked by the docpool.id
But now I have a problem with this: I made a table to log activities. You can store values and documents. But I have to store the activity before I can upload any document. So is there a solution without making a 2nd document table?

