Question

I'm working on an IT School project, so I'm gonna explain what I'm doing. I am designing a Telemarketing Campaign Creator. The MySQL Schema and database are correctly created but I have several problems and doubts.

I'm using Zend 2 Skeleton as my start point and I'm friendly with MVC programming method, so my doubt is how to start for implementing the models from my MySQL DB for my project.

Is there a methos to generate automatically the models?

Thanks for all! =D

P.S: I'm programming under Zend Studio 10.

Was it helpful?

Solution

If you're starting from scratch with Doctrine2, I would strongly advise you to come at it the other way around: Define your entities in doctrine, and use the doctrine CLI to generate and update your MySQL schema.

Remember, with Doctrine2, your Entities (which are 'just plain php objects') are first-class citizens. Database schema is just an implementation detail.

Once you get the hang of this workflow, it's incredibly productive. When the need arises, you can pull in the doctrine migrations library, and use it to easily manage schema changes over time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top