Category: Doctrine

Doctrine Logo 0

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...

Doctrine Logo 5

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...

Doctrine_Pager error “Invalid parameter number” when using “IN” in “WHERE” clause 0

Doctrine_Pager error “Invalid parameter number” when using “IN” in “WHERE” clause

This post is just to inform fellow users of Doctrine about a problem with Doctrine_Pager using “IN” for “WHERE” clauses. Simply put: Just don’t use it (at the moment), as it will result in the following error: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of...

Zend Framework Logo 0

Zend 1.11.6 and Doctrine 1.2

Recently, our project team spent quite some time figuring out a way to get Zend (ZF) working together with Doctrine ORM. Although there are a lot of howtos and guides out there it seems like everybody has his/her own way of merging these two frameworks. In order to get most...