Details
-
Type:
Bug
-
Status:
Open
-
Priority:
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:
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:
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
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Roman S. Borschel [ romanb ] | Jonathan H. Wage [ jwage ] |