diff --git a/tests/models/company/CompanyEmployee.php b/tests/models/company/CompanyEmployee.php new file mode 100644 index 000000000..dc365d306 --- /dev/null +++ b/tests/models/company/CompanyEmployee.php @@ -0,0 +1,41 @@ +setInheritanceType('joined', array( + 'discriminatorColumn' => 'dtype', + 'discriminatorMap' => array( + 'emp' => 'CompanyEmployee', + 'man' => 'CompanyManager') + )); + // register subclasses + $mapping->setSubclasses(array('CompanyManager')); + + $mapping->mapField(array( + 'fieldName' => 'id', + 'type' => 'integer', + 'length' => 4, + 'id' => true, + 'idGenerator' => 'auto' + )); + $mapping->mapField(array( + 'fieldName' => 'salary', + 'type' => 'double' + )); + //TODO: make department an entity + $mapping->mapField(array( + 'fieldName' => 'department', + 'type' => 'string' + )); + } + +} + +?> \ No newline at end of file diff --git a/tests/models/company/CompanyManager.php b/tests/models/company/CompanyManager.php new file mode 100644 index 000000000..5e0c8a231 --- /dev/null +++ b/tests/models/company/CompanyManager.php @@ -0,0 +1,14 @@ +mapColumn(array( + 'fieldName' => 'title', + 'type' => 'string' + )); + } +} + +?> \ No newline at end of file