mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
adding patch to dbo_postgres, #1828
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4395 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
ce033247ed
commit
8f7add9c29
1 changed files with 7 additions and 1 deletions
|
@ -347,7 +347,13 @@ class DboPostgres extends DboSource {
|
|||
* @return int
|
||||
*/
|
||||
function lastInsertId($source, $field = 'id') {
|
||||
if(strpos($this->__descriptions[$source][0]['default'], 'nextval') === false) {
|
||||
foreach ($this->__descriptions[$source] as $sourceinfo) {
|
||||
if (strcasecmp($sourceinfo['name'], $field) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(strpos($sourceinfo['default'], 'nextval') === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue