I think this is probably why the getSize does not work anymore for a non-persisted File. There should be a use statement for the BadMethodCallException of doctrine phpcr-odm.