Ticket #864 (closed enhancement: fixed)

Opened 2 months ago

Last modified 6 weeks ago

Allow specifying of doctrine template implementations

Reported by: MugeSo Owned by: david
Priority: normal Milestone: 0.11.4
Component: database Version: 0.11.3
Severity: normal Keywords: Doctrine
Cc: Patch attached: yes

Description

Doctrine provides behavior templates for records and relationship between templates.

Using this feature, we should call:

$manager = Doctrine_Manager::getInstance();
$manager->setImpl('UserTemplate', 'User');

I think Agavi should allow this via database.xml like:

<database name="doctrine" class="AgaviDoctrineDatabase">
  <parameter name="dsn">pgsql://user:password@localhost/dbname</parameter>
  <parameter name="load_models">
    <parameter>%core.model_dir%/doctrine</parameter>
  </parameter>
  <parameter name="templates_implementation_map">
    <parameter name="UserTemplate">User</parameter>
  </parameter>
</database>

Attachments

allow_loading_concrete_implementation_for_template.patch (0.7 KB) - added by MugeSo 2 months ago.
patch for 0.11.3
allow_loading_concrete_implementation_for_template_via_connection.patch (1.2 KB) - added by MugeSo 8 weeks ago.
patch for 0.11.3. encoded with UTF-8n.

Change History

Changed 2 months ago by MugeSo

patch for 0.11.3

Changed 8 weeks ago by david

  • status changed from new to assigned
  • milestone set to 0.11.4

Changed 8 weeks ago by david

Koichi,

the docs say

The implementations for the templates can be set at manager, connection and even at the table level.

which I think we should do (set it on the connection).

objections?

Changed 8 weeks ago by MugeSo

Oh, I missed that line!

Do you mean this ?:

foreach((array)$this->getParameter('templates_implementation_map', array()) as $templateName => $concreteImpl) {
  $this->connection->setImpl($templateName, $concreteImpl);
}

If so, I don't have any objection ;)

Changed 8 weeks ago by MugeSo

patch for 0.11.3. encoded with UTF-8n.

Changed 8 weeks ago by david

Yes exactly. Thanks :)

Changed 8 weeks ago by david

  • summary changed from Allow concrete implementation loading for doctrine templates to Allow specifying of doctrine template implementations

Changed 8 weeks ago by david

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

(In [2945]) Allow specifying of doctrine template implementations, closes #864

Changed 8 weeks ago by david

I've called the params impls and manager_impls to be consistent with all the other params that are already there. thanks for the help!

Changed 6 weeks ago by anonymous

I need Thank you! nike shoes,jordan shoes,Adidas Shoes,Puma Shoes discount New styles have just arrived! Free Shipping Free Returns.nike shoes jordan shoes

Add/Change #864 (Allow specifying of doctrine template implementations)

Author



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