Skip to content

Commit 25ed5b9

Browse files
author
Aleksander Korelskiy
committed
int to bigint cast fix
1 parent 1bf4609 commit 25ed5b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traits/RepositoryFindByExternalIdTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function findByExternalIdAndExternalSourceAndExternalSubId(string $extern
5252
*/
5353
public function getLastExternalId($castToInt = true)
5454
{
55-
$query = 'MAX(cast (e.externalId as int)) as maxExternalId';
55+
$query = 'MAX(cast (e.externalId as bigint)) as maxExternalId';
5656

5757
if (!$castToInt) {
5858
$query = 'MAX(e.externalId) as maxExternalId';
@@ -77,7 +77,7 @@ public function getLastExternalId($castToInt = true)
7777
*/
7878
public function getLastExternalIdBySource(int $externalSource, $castToInt = true)
7979
{
80-
$query = 'MAX(cast (e.externalId as int)) as maxExternalId';
80+
$query = 'MAX(cast (e.externalId as bigint)) as maxExternalId';
8181

8282
if (!$castToInt) {
8383
$query = 'MAX(e.externalId) as maxExternalId';

0 commit comments

Comments
 (0)