Add tests for Doctrine persistence

Ensure that persisting classes using the types collection using Doctrine.