mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-01-26 02:38:40 +00:00
remove db prefix
This commit is contained in:
parent
f5883de3e7
commit
af161e8788
|
|
@ -64,7 +64,7 @@ final class EmployeeMapper extends DataMapperAbstract
|
|||
protected static array $hasMany = [
|
||||
'companyHistory' => [
|
||||
'mapper' => EmployeeHistoryMapper::class,
|
||||
'table' => 'hr_staff_history',
|
||||
'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,
|
||||
],
|
||||
|
|
@ -98,8 +98,7 @@ final class EmployeeMapper extends DataMapperAbstract
|
|||
public static function getFromAccount(int $account) : Employee
|
||||
{
|
||||
$query = new Builder(self::$db);
|
||||
$query->prefix(self::$db->getPrefix())
|
||||
->select(self::$table . '.*')
|
||||
$query->select(self::$table . '.*')
|
||||
->from(self::$table)
|
||||
->innerJoin(ProfileMapper::getTable())
|
||||
->on(self::$table . '.hr_staff_profile', '=', ProfileMapper::getTable() . '.' . ProfileMapper::getPrimaryField())
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ class StaffList
|
|||
$search = $this->dbPool->get()->generate_sql_filter($filter, true);
|
||||
|
||||
$sth = $this->dbPool->get()->con->prepare('SELECT
|
||||
`' . $this->dbPool->get()->prefix . 'hr_staff`.*
|
||||
`hr_staff`.*
|
||||
FROM
|
||||
`' . $this->dbPool->get()->prefix . 'hr_staff` '
|
||||
. $search . 'LIMIT ' . $offset . ',' . $limit);
|
||||
`hr_staff` '
|
||||
. $search . 'LIMIT ' . $offset . ',' . $limit);
|
||||
$sth->execute();
|
||||
|
||||
$result['list'] = $sth->fetchAll();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user