mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-02-14 03:38:41 +00:00
remove db prefix
This commit is contained in:
parent
07c9a19092
commit
10384326b5
|
|
@ -74,7 +74,7 @@ final class Application
|
||||||
/**
|
/**
|
||||||
* Temp config.
|
* Temp config.
|
||||||
*
|
*
|
||||||
* @var array{db:array{core:array{masters:array{select:array{db:string, host:string, port:int, login:string, password:string, database:string, prefix:string}}}}, log:array{file:array{path:string}}, app:array{path:string, default:string, domains:array}, page:array{root:string, https:bool}, language:string[]}
|
* @var array{db:array{core:array{masters:array{select:array{db:string, host:string, port:int, login:string, password:string, database:string}}}}, log:array{file:array{path:string}}, app:array{path:string, default:string, domains:array}, page:array{root:string, https:bool}, language:string[]}
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private array $config;
|
private array $config;
|
||||||
|
|
@ -83,7 +83,7 @@ final class Application
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param WebApplication $app WebApplication
|
* @param WebApplication $app WebApplication
|
||||||
* @param array{db:array{core:array{masters:array{select:array{db:string, host:string, port:int, login:string, password:string, database:string, prefix:string}}}}, log:array{file:array{path:string}}, app:array{path:string, default:string, domains:array}, page:array{root:string, https:bool}, language:string[]} $config Application config
|
* @param array{db:array{core:array{masters:array{select:array{db:string, host:string, port:int, login:string, password:string, database:string}}}}, log:array{file:array{path:string}}, app:array{path:string, default:string, domains:array}, page:array{root:string, https:bool}, language:string[]} $config Application config
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -111,15 +111,13 @@ final class SessionMapper extends DataMapperAbstract
|
||||||
public static function getLastSessionsFromAllEmployees(\DateTime $dt = null) : array
|
public static function getLastSessionsFromAllEmployees(\DateTime $dt = null) : array
|
||||||
{
|
{
|
||||||
$join = new Builder(self::$db);
|
$join = new Builder(self::$db);
|
||||||
$join->prefix(self::$db->getPrefix())
|
$join->select(self::$table . '.hr_timerecording_session_employee')
|
||||||
->select(self::$table . '.hr_timerecording_session_employee')
|
|
||||||
->selectAs('MAX(hr_timerecording_session_start)', 'maxDate')
|
->selectAs('MAX(hr_timerecording_session_start)', 'maxDate')
|
||||||
->from(self::$table)
|
->from(self::$table)
|
||||||
->groupBy(self::$table . '.hr_timerecording_session_employee');
|
->groupBy(self::$table . '.hr_timerecording_session_employee');
|
||||||
|
|
||||||
$query = new Builder(self::$db);
|
$query = new Builder(self::$db);
|
||||||
$query->prefix(self::$db->getPrefix())
|
$query->select('*')->fromAs(self::$table, 't')
|
||||||
->select('*')->fromAs(self::$table, 't')
|
|
||||||
->innerJoin($join, 'tm')
|
->innerJoin($join, 'tm')
|
||||||
->on('t.hr_timerecording_session_employee', '=', 'tm.hr_timerecording_session_employee')
|
->on('t.hr_timerecording_session_employee', '=', 'tm.hr_timerecording_session_employee')
|
||||||
->andOn('t.hr_timerecording_session_start', '=', 'tm.maxDate');
|
->andOn('t.hr_timerecording_session_start', '=', 'tm.maxDate');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user