mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-01-11 12:28:39 +00:00
correct datamapper self/external usage (invert)
This commit is contained in:
parent
e153df4ee4
commit
b076c12280
|
|
@ -54,19 +54,19 @@ final class EmployeeHistoryMapper extends DataMapperAbstract
|
|||
protected static array $belongsTo = [
|
||||
'unit' => [
|
||||
'mapper' => UnitMapper::class,
|
||||
'self' => 'hr_staff_history_unit',
|
||||
'external' => 'hr_staff_history_unit',
|
||||
],
|
||||
'department' => [
|
||||
'mapper' => DepartmentMapper::class,
|
||||
'self' => 'hr_staff_history_department',
|
||||
'external' => 'hr_staff_history_department',
|
||||
],
|
||||
'position' => [
|
||||
'mapper' => PositionMapper::class,
|
||||
'self' => 'hr_staff_history_position',
|
||||
'external' => 'hr_staff_history_position',
|
||||
],
|
||||
'employee' => [
|
||||
'mapper' => EmployeeMapper::class,
|
||||
'self' => 'hr_staff_history_staff',
|
||||
'external' => 'hr_staff_history_staff',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ final class EmployeeMapper extends DataMapperAbstract
|
|||
protected static array $belongsTo = [
|
||||
'profile' => [
|
||||
'mapper' => ProfileMapper::class,
|
||||
'self' => 'hr_staff_profile',
|
||||
'external' => 'hr_staff_profile',
|
||||
],
|
||||
];
|
||||
|
||||
|
|
@ -65,8 +65,8 @@ final class EmployeeMapper extends DataMapperAbstract
|
|||
'companyHistory' => [
|
||||
'mapper' => EmployeeHistoryMapper::class,
|
||||
'table' => 'hr_staff_history', // @todo: is this requried? This is stored in the mapper already. In other places I'm not using this, either use it everywhere or nowhere. Using the mapper is slower but protects us from table name changes!
|
||||
'external' => 'hr_staff_history_staff',
|
||||
'self' => null,
|
||||
'self' => 'hr_staff_history_staff',
|
||||
'external' => null,
|
||||
],
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user