Development

#6718 (using Doctrine::MODEL_LOADING_CONSERVATIVE does not properly rebuild schema or base classes)

You must first sign up to be able to contribute.

Ticket #6718 (closed defect: invalid)

Opened 7 months ago

Last modified 7 months ago

using Doctrine::MODEL_LOADING_CONSERVATIVE does not properly rebuild schema or base classes

Reported by: ericb Assigned to: Jonathan.Wage
Priority: major Milestone:
Component: sfDoctrinePlugin Version: 1.2.7
Keywords: MODEL_LOADING_CONSERVATIVE,Doctrine, autoload, symfony build-schema Cc:
Qualification: Unreviewed

Description

inside ProjectConfiguration?.class.php in a symfony project, using something like:

  public function configureDoctrine(Doctrine_Manager $manager) {
    $manager->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
    $manager->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_ALL);
    $manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL);
  }

causes strange behavior with ./symfony doctrine:build-schema. The offending line seems to be:

$manager->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);

namely, the problems are as follows:

  • without removing the lib/model/doctrine/base directory, the old versions of the Base classes were used instead of the tmp directory derived files to generate the yml.
  • database changes were not properly recognized in the schema.yml.
  • autoloading exceptions are thrown if ../base is removed in an attempt to "force" doctrine to see the new DB layout

is this expected behavior?

Change History

07/07/09 01:13:14 changed by Jonathan.Wage

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

The model loading is irrelevant when using Doctrine in symfony. Symfony handles the loading of models.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.