Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctrine_Record_Generator problem #15

Open
dgaspar opened this issue Aug 29, 2010 · 2 comments
Open

Doctrine_Record_Generator problem #15

dgaspar opened this issue Aug 29, 2010 · 2 comments

Comments

@dgaspar
Copy link

dgaspar commented Aug 29, 2010

In a project with ZFDoctrine, I'm having a hard time using Behaviors that generate their own table/class (ex: log tables, versions, etc..): Doctrine_Record_Generator uses by default Doctrine_Import_Builder. As a result, the auto-generated auxiliary table created by the plugin do not respect ZFDoctrine's model naming conventions.

It would be interesting if we could create Template's plugins extending a ZFDoctrine_Record_Generator class that would override its method generateClass()
to use ZFDoctrine_Import_Builder instead of Doctrine_Import_Builder.

@virak
Copy link

virak commented Aug 29, 2010

Yeap, I completly agree. This new Record Generator could be very interesting for future development purposes!

@dgaspar
Copy link
Author

dgaspar commented Aug 29, 2010

obs: when extending the Record Generator, I had to use the following $options so I could have models compatible to those generated by ZFDoctrine's generate-models-from-yaml:

protected $_options = array(
    'className' => '%CLASS%Log',
    'tableName' => '%TABLE%log',
    'generateFiles' => true,
    'generatePath' => './application/models/',
    'table' => false,
    'builderOptions' => array(
        'baseClassesDirectory' => 'Base',
        'generateBaseClasses' => true,
        'generateTableClasses' => true
    )
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants