views:

58

answers:

2

I managed to get my Zend modular project working with Doctrine 1.2 according to these instructions

http://github.com/beberlei/zf-doctrine and I have one question:

Can I somehow get rid of writing entity names with prefixes Default_Model_ and Forum_Model_? For example write this prefix only once somewhere in yml and all entities in yml file will have it, or better by placing schema.yml into module folder and the entities will automatically gain the proper prefix by it's module.

I want to use some tool for designing these entities but I really don't want to have ugly names Default_Model_User, etc.

Thanks in advance Martin Srom

A: 

As a developer of that integration: Sorry that is one of the restrictions you cannot circumvent (to my knowledge). With additional aliasing the implementation would have been much more complicated and subject to errors.

beberlei
A: 

Hello Martin,

If you don't like to write complicated names in Doctrine model while using Zend framework, you can try to use ORM Designer. Beside the fact, that you design the whole model visually instead of in text editor, it allows you to define the prefixes for separated modules. In model you work with short names and when exporting, ORM Designer joins the prefix with the name and generates you to schema.yml the name as requested by Zend FW.

More about this feature is in ORM Designer blog: http://blog.orm-designer.com/2010/09/prefixes-for-doctrine-orm-entities-useful-for-doctrine-and-zend-framework/

ORM Designer site: www.orm-designer.com

Ludek Vodicka