On May 29, 2013, at 3:13 AM, eokorie wrote:

>            $builder = new AnnotationBuilder($this->em);
>            $form = $builder->createForm(new BlogCategories());

I assume you are using a custom AnnotationBuilder to inject the Doctrine 
EntityManager via the constructor like that?

If so, I'd look in there and maybe see if you can get it to work with the 
standard AnnotationBuilder.

Also, we're doing something very similar, but with a few differences, in case 
any of these matter:

1. We are using setter injection by extending createForm() to accept a second 
optional EntityManager argument (probably shouldn't matter, and in fact I like 
the constructor idea for injecting the em.)

2. We are using xml rather than annotations for the Doctrine metadata. We 
considered using Doctrine annotations, but figured it could make things more 
complicated to manage mixed Doctrine and Form annotations, as we're using ORM 
Designer, and then doing code generation based on the Doctrine meta-data. In 
other words, we need to have the Doctrine meta-data kept separate from the 
Entities, so we can generate the entities.

3. We're not using the standard formCollection() helper because we have our own 
renderFormFields() helper which supports runtime config to set the order of the 
elements on the form.

HTH

Jeremiah

Reply via email to