Sunday, 15 April 2012

php - Doctrine ORM JOINS -


I have some simple classes, which are all extended principles.

Now I want to do a little bit more to join the inner complex of the complex query, not only to remove the table data.

I am using DQL, does it oblige me to manually define the relationship between two tables? Should I define this relation class or can I update better schema. IML and then reproduce the class code?

You can add links to your .yaml file and then re-generation your classes like this can do. Documentation of principles about relationships in Yamal files.

You will need to regenerate your DB so that the principles can add the right foreign key barriers on the basis of new relationships. It is relatively simple and believes that you do not care about losing your data. If you care about losing data, you should use the principle to manage your migration, but it is beyond the scope of your question. You can find more information about migration by looking at Frankel's answer.


No comments:

Post a Comment