DDC-97: \Doctrine\ORM\Mapping\Driver\Driver::preload($force=false) is missing #118

Closed
opened 2026-01-22 12:27:49 +01:00 by admin · 6 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 2, 2009).

Jira issue originally created by user @beberlei:

Every driver implementation has a preload() method, however it is not present on the interface.

It should however be on the interface to consistently call preload on the CLI tasks which require all the metadata.

Originally created by @doctrinebot on GitHub (Nov 2, 2009). Jira issue originally created by user @beberlei: Every driver implementation has a preload() method, however it is not present on the interface. It should however be on the interface to consistently call preload on the CLI tasks which require all the metadata.
admin added the Bug label 2026-01-22 12:27:49 +01:00
admin closed this issue 2026-01-22 12:27:49 +01:00
Author
Owner
@doctrinebot commented on GitHub (Nov 2, 2009): - is duplicated by [DDC-107: Mapping driver interface does not require preload(), but mapping drivers are expected to implement it.](http://www.doctrine-project.org/jira/browse/DDC-107) - relates to [DDC-98: SchemaToolTask's use of Driver\preload() is not "deterministic"](http://www.doctrine-project.org/jira/browse/DDC-98)
Author
Owner

@doctrinebot commented on GitHub (Nov 2, 2009):

Comment created by @beberlei:

Attached a patch that adds a new method to the interface Driver:

<ins>                                                                                                                                        
</ins>    /****                                                                                                                                 
<ins>     * Preload entities and return an array of entities that have been preloaded.                                                       
</ins>     *                                                                                                                                  
<ins>     * On consecutive calls the preload will only return newly preloaded entities.                                                      
</ins>     * Therefore you should not rely on the return value, but use the                                                                   
<ins>     * {@link ClassMetadataFactory::getLoadedMetadata()} method.                                                                        
</ins>     *
<ins>     * @param  bool $force
</ins>     * @return array
<ins>     */
</ins>    public function preload($force=false);

And adds the $force flag to some of the drivers that don't require it.

@doctrinebot commented on GitHub (Nov 2, 2009): Comment created by @beberlei: Attached a patch that adds a new method to the interface Driver: ``` <ins> </ins> /**** <ins> * Preload entities and return an array of entities that have been preloaded. </ins> * <ins> * On consecutive calls the preload will only return newly preloaded entities. </ins> * Therefore you should not rely on the return value, but use the <ins> * {@link ClassMetadataFactory::getLoadedMetadata()} method. </ins> * <ins> * @param bool $force </ins> * @return array <ins> */ </ins> public function preload($force=false); ``` And adds the $force flag to some of the drivers that don't require it.
Author
Owner

@doctrinebot commented on GitHub (Nov 3, 2009):

Comment created by romanb:

Scheduled for ALPHA4 where we will probably get rid of PRELOAD as a regular operating mode.

@doctrinebot commented on GitHub (Nov 3, 2009): Comment created by romanb: Scheduled for ALPHA4 where we will probably get rid of PRELOAD as a regular operating mode.
Author
Owner

@doctrinebot commented on GitHub (Dec 15, 2009):

Comment created by romanb:

PRELOAD mode removed. ClassMetadataFactory#getAllMetadata introduced.

@doctrinebot commented on GitHub (Dec 15, 2009): Comment created by romanb: PRELOAD mode removed. ClassMetadataFactory#getAllMetadata introduced.
Author
Owner

@doctrinebot commented on GitHub (Dec 15, 2009):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Dec 15, 2009): Issue was closed with resolution "Fixed"
Author
Owner

@doctrinebot commented on GitHub (Dec 13, 2015):

Imported 1 attachments from Jira into https://gist.github.com/acfe2d3d7c71b41e97aa

@doctrinebot commented on GitHub (Dec 13, 2015): Imported 1 attachments from Jira into https://gist.github.com/acfe2d3d7c71b41e97aa - [10126_ddc_97.diff](https://gist.github.com/acfe2d3d7c71b41e97aa#file-10126_ddc_97-diff)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#118