How to join tables to preload values from them into the same field

Hey I have 3 tables,
a post and a post can have an attachment that can either be
a picture or a document, the post doesn’t hold a reference to the picture or document tables
I would like to preload the data from the picture and document tables into the post’s attachment field, how to do this?
to my attempts so far I have gotten this error message:

(ArgumentError) cannot preload attachment as it has been supplied more than once with different queries

I was thinking something like this:

attachment = from(pp in PhotoPost and dp in DocumentPost)

from(p in query,
  preload: [attachment: ^attachment]

but this just gives that error

Ecto does not support that kind of polymorphic dependencies (most because database don’t really do as well). The simplest is just doing the combination at runtime.