what if I have an object graph involving both an entity and a document and I want to serialize this object graph ?