Uploaded image for project: 'Doctrine 1'
  1. Doctrine 1
  2. DC-388

Conservative loading not working


    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Attributes
    • Labels:
    • Environment:
      Apache 2, MySQL 5.1, PHP 5.2.9, Debian 5


      Apparently, when setting Doctrine::MODEL_LOADING_CONSERVATIVE things like Doctrine_Core::createTablesFromModels() don't work. Have to enable aggressive model loading. This has been confirmed on the doctrine-user mailing list.

      I took a brief look at the code: I may be missing something but it appears there may be a logic difference in the conservative vs. aggressive model loading method. Aggressive loading uses require_once on all files in the model directory and tries to determine the name of the class inside the file (by doing a difference on the loaded classes). This logic makes sense since the class and file name do not have to match.

      However, conservative loading just tries to calculate the class name and store it in an array for later loading by the autoloader. This means there is a huge logic difference in behaviour between these two loading methods since the model class files actually must differ depending on case (specifically, the model class file name must follow a specific format to match the actual class name) otherwise the autoload array will never know the correct name of the class.

      I would also like to comment that overall, require_once is a poor choice for performance reasons, it's vastly slower than include_once, but overall the logic should better be adjusted to use plain include (if possible), for performance reasons.


        drak Karma Dordrak (Drak) created issue -
        beberlei Benjamin Eberlei made changes -
        Field Original Value New Value
        Assignee Jonathan H. Wage [ jwage ] Benjamin Eberlei [ beberlei ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DC-388}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            beberlei Benjamin Eberlei
            drak Karma Dordrak (Drak)
          • Votes:
            1 Vote for this issue
            0 Start watching this issue


            • Created: