Doctrine represents one of the best-known and performant database libraries today. It is comprised of a set of stable and highly performant libaries for database storage (Doctrine DBAL) and object mapping (Doctrine ORM). This post describes the steps needed to integrate Doctrine 2 into your project using composer. Setup using Composer First, make sure that […]
Tag: doctrine 2
Doctrine 2 Exception EntityManager is closed
Doctrine 2’s EntityManager class will permanently close connections upon failed transactions. Thus, further requests using these closed instances will fail with the following exception: So, make sure to check your EntityManager’s state before your actual tasks: Better, create a function called getEntityManager that takes care of this check and makes sure that you always get […]
Managing Doctrine 2 Entity Model mapping classes using YamlDriver in Zend Framework 2
This post continues my approach to integrate Doctrine 2 into Zend Framework 2 by additionally setting up YamlDriver to generate and manage Doctrine 2 Entity model mapping files. First, we need to install the YAML dependency symfony/yaml: And rebuild our project: In case you forget the install the symfony/yaml module you will get an error […]
Zend Framework 2 and Doctrine 2 ORM Integration
So, finally I’ve found time to start a new approach of migrating older Zend Framework (ZF) 1 projects to ZF2. To get most out of ZF2 and its new modular design I’ve decided to simultaneously try out the Doctrine 2 ORM module. These are the steps I’ve used to integrate Doctrine 2 into ZF2. Skeleton […]