Ticket #759 (closed defect: fixed)
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
Change History
Note: See
TracTickets for help on using
tickets.

