Hello,

As I told I will propose all the things I made in my Symfony plugin
and I think should be in Propel's core. See
http://www.symfony-project.org/plugins/nahoPropelOptimizerPlugin/0_0_2?tab=plugin_readme
for the full list.

If we have two foreign keys to the same table, for example in a tyre
selling website I have on my "car" table two foreign keys to the
"dimension" table : one for rear tyres, the other for front tyres.
When I call doSelectJoinAll it will generate a SQL error as Propel
just lists twice the same table in the query, without using aliases !
I'm forced to call doSelectJoinAllExceptDimensionIdForRearTyres()...
And if I had two pairs of foreign keys, I would have to copy-paste
those horrible doSelectJoin* methods, to create my own...

The evolution I will propose will force Propel to use aliases in the
doSelectJoinXXX methods, so that we get rid of this issue and
doSelectJoinAll will ALWAYS work.
This evolution + the one that use INNER/LEFT joins depending on the
foreign key will make doSelectJoin very smart and always return the
expected result.

To see the implementation (which is not a patch, but extends
PHP5PeerBuilder), look at
http://trac.symfony-project.org/browser/plugins/nahoPropelOptimizerPlugin/trunk/lib/SfOptimizedPeerBuilder.php
beginning at lines 417-465.

What do you think about ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to