Development

#10035 (Double database connection trouble when in admin module or generic module)

You must first sign up to be able to contribute.

Ticket #10035 (closed defect: invalid)

Opened 1 year ago

Last modified 8 months ago

Double database connection trouble when in admin module or generic module

Reported by: alcad Assigned to: fabien
Priority: major Milestone:
Component: model Version: 1.4.16
Keywords: database connection doctrine Cc:
Qualification: Unreviewed

Description

When we have a multiple database connection i encountered a bug in the generation of base model class.

The class is ok when I use a admin module, cannot connect in normal module.

Workaround is to add a new bind in the lib/model/doctrine/base/Base{MODELNAME}.class.php file

The row autogenerated for bind is:

Doctrine_Manager::getInstance()->bindComponent('ModelName?', 'database2');

The workaround is to add a new line with lower case of model name:

Doctrine_Manager::getInstance()->bindComponent('ModelName?', 'database2'); Doctrine_Manager::getInstance()->bindComponent('modelname', 'database2');

This way all ok. This modify lost when you regenerate the model classes

Change History

05/10/12 15:54:31 changed by alcad

  • keywords changed from database connection to database connection doctrine.
  • priority changed from minor to major.

06/29/12 01:01:03 changed by fabien

  • status changed from new to closed.
  • resolution set to invalid.

This is a Doctrine issue, not a symfony one.