Doctrine 1
  1. Doctrine 1
  2. DC-860

0 down vote favorite In some circumstances Doctrine_Core::getTable('%Name%') returns Doctrine_Table instance instead of %Name%Table one.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Blocker Blocker
    • Resolution: Unresolved
    • Affects Version/s: 1.2.3
    • Fix Version/s: None
    • Component/s: Relations
    • Labels:
      None
    • Environment:
      WinXP, Apache, PHP 5.2.14

      Description

      In some circumstances Doctrine_Core::getTable('%Name%') returns Doctrine_Table instance instead of %Name%Table one.
      So custom %Name%Table's methods become unavailable.

      In order to give a demonstration of this improper behavior : here is a schema of small issue tracking system

      User:
      actAs: [Timestampable]
      tableName: issue_user
      columns:
      user_id:

      { type: integer, primary: true, autoincrement: true }

      user_name:

      { type: string(255) }

      user_role:

      { type: enum, values: [worker, dispatcher, manager] }

      managed_by:

      { type: integer }

      password:

      { type: string(32) }

      salt:

      { type: string(32) }

      relations:
      Manager:
      foreignAlias: Workers
      class: User
      local: managed_by
      foreign: user_id
      type: one
      foreignType: many

      Issue:
      actAs: [Timestampable]
      columns:
      issue_id:

      { type: integer, primary: true, autoincrement: true }

      from_ceh:

      { type: string(255) }

      from_name:

      { type: string(255) }

      from_phone:

      { type: string(255) }

      from_location:

      { type: string(255) }

      comp_name:

      { type: string(255) }

      comp_serial:

      { type: string(255) }

      comp_os:

      { type: enum, values: [Win95, Win98, WinNT, WinME, Win2000, WinXP, Vista, Win7] }

      issue_title:

      { type: string(255) }

      comment:

      { type: string(255) }

      owner_id:

      { type: integer }

      is_executed:

      { type: bool }

      relations:
      Owner:
      onDelete: CASCADE
      foreignAlias: Issues
      class: User
      local: owner_id
      foreign: user_id
      type: one
      foreignType: many

      When I just call Doctrine_Core::getTable('User') it returns UserTable instance, but if I call it after such a query:

      Doctrine_Query::create()
      ->select('u.user_id, ws.user_id, i.*')
      ->from('User u, u.Workers ws, ws.Issues i')
      ->where('u.user_id=', $manager_id)
      ->fetchArray();

      calling Doctrine_Core::getTable('User') returns Doctrine_Table instance

        Activity

        Hong Kil Dong created issue -
        Roman S. Borschel made changes -
        Field Original Value New Value
        Assignee Roman S. Borschel [ romanb ] Jonathan H. Wage [ jwage ]

        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={query=DC-860, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Hong Kil Dong
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: