Hi, I don't know how can I work with related entity before saving. I have 2 entites Document and DocumentType. When I can create new Document:
$document = new \Document();
and then set DocumentType fetched from database:
and now I need to approach to DocumentType via getter in Document, but when the Document is not saved, getter returns null.
I suppose than magic getter does something like this:
but I don't know how can I work with that. Please tell me how can do that. Thanks.