Ticket #759 (closed defect: fixed)

Opened 7 months ago

Last modified 5 months ago

Add support for native doctrine model autoloading

Reported by: MikeSeth Owned by: david
Priority: low Milestone: 0.11.2
Component: database Version: 0.11.0
Severity: trivial Keywords: database autoloading orm model doctrine adapter
Cc: Patch attached: yes

Description (last modified by david) (diff)

This is a small patch that extends AgaviDoctrineDatabase? to add configuration parameter model_path so that you can specify the ORM class (Doctrine model) path[s] in configuration and have Doctrine autoload them. Doctrine also supports lazy vs aggressive model loading which can be configured using the attributes configuration in this driver. By default, Doctrine uses the aggressive loading model. In production, you should switch it to lazy loading. See Doctrine manual chapter 1.7 for explanations.

You can specify a single value or multiple <parameter> elements.

Example:

<database name="doctrine" class="AgaviDoctrineDatabase">
 <parameters>
   <parameter name="dsn">mysql://foo@bar/cat</parameter>
   <parameter name="model_path">
     <parameter>%core.app_dir%/db/models</parameter>
     <parameter>%core.lib_dir%/libmylib/doctrine-models</parameter>
   </parameter>
 </parameters>
</database>

Attachments

native-autoloading.diff (1.1 KB) - added by MikeSeth 7 months ago.
Patch against AgaviDoctrineDatabase?

Change History

Changed 7 months ago by MikeSeth

Patch against AgaviDoctrineDatabase?

Changed 7 months ago by david

  • status changed from new to assigned

Changed 6 months ago by david

  • summary changed from Add support for native model autoloading to Add support for native doctrine model autoloading
  • milestone changed from 0.11.1 to 0.11.2

Changed 5 months ago by david

  • description modified (diff)

Changed 5 months ago by david

  • status changed from assigned to closed
  • resolution set to fixed

(In [2537]) Added support for native doctrine model autoloading, closes #759

Add/Change #759 (Add support for native doctrine model autoloading)

Author



Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.