#1593: mis-parsing of WITH conditions on joins
-----------------------------------+----------------------------------------
 Reporter:  pbowyer                |       Owner:  jwage  
     Type:  defect                 |      Status:  new    
 Priority:  major                  |   Milestone:  Unknown
Component:  Compiler               |     Version:  1.0.3  
 Keywords:                         |    Has_test:  0      
 Mystatus:  Pending Core Response  |   Has_patch:  0      
-----------------------------------+----------------------------------------
 {{{
 $q->select("(vp.rate_standard_day * $days + vp.rate_standard_week *
 $weeks) AS total_cost, ".
                "(vp.rate_premium_day * $days + vp.rate_premium_week *
 $weeks) AS premium_cost, ".
                "IF(vp.rate_standard_day * 0 + vp.rate_standard_week * 1,
 0, 1) AS has_standard_price, s.name, ".
                "vt.name, v.*, l.*, vu.*, vp.*")
                ->from('Vehicle v')
                ->innerjoin('v.Price vp')
                ->innerJoin('v.Supplier s')
                ->innerJoin('v.Locations l')
                ->leftJoin('v.Upgrade vu  WITH (vu.date_start <= ? AND
 vu.date_end > ?)', array($pickup_date, $pickup_date))
                ->orderBy('has_standard_price ASC, total_cost ASC,
 premium_cost ASC');
 }}}

 This should be OK however... Doctrine fails to resolve the 'vu' in the
 WITH clause, failing (this is via sfDoctrinePlugin) with the following:

 {{{
 Couldn't find class vu at ()
       in
 SF_ROOT_DIR/plugins/sfDoctrinePlugin/lib/doctrine/Doctrine/Table.php line
 268
 }}}

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1593>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" 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.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to