Answer the question
In order to leave comments, you need to log in
Working with the database in OOP applications in php 5.3
Tell us, who uses what to work with the database ( MySQL )?
Are you using an ORM ? If so, which one?
If not, how do you solve the problem of many-to-many relationships through the third table ? Are you creating an object for the third table?
I ask, because I have been tormented for more than a week - what to choose. Doctrine is recommended everywhere . I used it for my bike a year or two ago (the version was 1 stable then). Seemed unnecessarily redundant and terribly slow. The compilation of all classes into one file of 2.5 megabytes in size saved me a little then. I tried to take the second version in a hurry - it did not work right away. Is it worth it to "dig" further?
I will use MyISAM without foreign keys, of all the goodies, only mapping to objects and an iterator over them are really needed. Well, the ability to make "clean" requests if necessary. Links again. As many-to-one, and through the third table. A high load is planned.
I tried phpactiverecord - it's not a bad thing, but with relations it has ... Pichal. As with compound class names like My_Library_Facade, My_Library_Proxy etc.
Answer the question
In order to leave comments, you need to log in
I have my own bike :) many-to-many via a graph for which there is a separate table
Propel - has everything you are looking for + much more and without the brakes of wild doctrine
Are you using any framework?
We use Kohana 3 and Jelly for it - it's cheap, it's good with relations.
Many-to-many does not require the creation of a model for the intermediate table.
One problem - not standalone.
When developing using the Yii Framework, I mainly use ORM. Sometimes in bottlenecks I make requests manually, through PDO. There were no particular performance issues.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question