#1656: Unnecessary lazy loading if column is NULL in database
-----------------------------------+----------------------------------------
 Reporter:  Levank                 |       Owner:  jwage  
     Type:  defect                 |      Status:  new    
 Priority:  major                  |   Milestone:  Unknown
Component:  Other                  |     Version:  0.11.0 
 Keywords:  lazy loading           |    Has_test:  0      
 Mystatus:  Pending Core Response  |   Has_patch:  0      
-----------------------------------+----------------------------------------
 sfDoctrinePlugin 1.0 revision 12726
 php 5.2.3
 doctrine 0.11 revision 5159

 Doctrine will lazy load objects if the value of the column is NULL in
 database even though you selected it in your doctrine query when you were
 creating a collection.

 Example Schema:
 {{{
 User:
   tableName: test_user
   actAs:
     Timestampable:
       created:
         name: created_at
         type: timestamp
         format:Y-m-d H:i:s
         options: []
       updated:
         disabled: true
   columns:
     id:           { type: integer, primary: true, autoincrement: true }
     fname:        { type: string(15) }
     lname:        { type: string(20) }
     dname:        { type: string(35) }
 }}}

 Example code:
 {{{
 //In action
 $this->users = Doctrine_Query::create()->select('u.id, u.fname,
 u.dname')->from('User u')->execute();

 //In Template
 <?php

 foreach($users as $user)
 {
 echo $user->getDname();
 }

 ?>
 }}}

 I use symfony framework and debugging shows me there are as many
 unnecessary lazy loads as there are "dname" column in database equal to
 NULL. I think this is a major performance issue.

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1656>
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