Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.2.0-BETA2
-
Fix Version/s: 1.2.0-BETA3
-
Component/s: Import/Export, Inheritance
-
Labels:None
-
Environment:PHP 5.2.9 on Windows 2003
Description
If class prefixes are being used with inheritance, the items in the setSubClasses array do not include the class prefix. I only tested this with column aggregation. Assuming that the prefix is "Default_Model_", the below example generates a "Default_Model_User" and "Default_Model_UserAdmin" class.
Inside the Default_Model_User class, this is generated:
$this->setSubClasses(array('UserAdmin' => array('coursetype' => 1)));
but it should be:
$this->setSubClasses(array('Default_Model_UserAdmin' => array('coursetype' => 1)));
Example schema:
User:
columns:
id:
primary: true
type: integer(4)
unsigned: 1
autoincrement: true
name:
type: string(255)
notnull: true
type:
type: integer(4)
unsigned: 1
UserAdmin:
inheritance:
extends: User
type: column_aggregation
keyField: type
keyValue: 1
columns:
test:
type: integer(1)
unsigned: 1
default: 128