lexik/LexikTranslationBundle — pull request #89 by arendjantetteroo (2014-08-20 13:01:15+00:00)
Title: Fix formatter for Mongo if called from format

If formatOne is called from format, the transUnit is already an array that contains the [_id].
If formatOne is called from createSingleResponse, it uses toArray which sets the ['id'] field. In this case it no longer has ["_id'], so it fails.

This commit fixes this by setting the ['id'] field if the transUnit is not an object and mongo is the storage engine. This way there always is an ['id'] field.