Prado\Data\SqlMap\Statements\TMappedStatement::executeSelectKey PHP Method

executeSelectKey() protected method

Execute the select key statement, used to obtain last insert ID.
protected executeSelectKey ( $connection, $parameter, $selectKey ) : string
return string last insert ID.
    protected function executeSelectKey($connection, $parameter, $selectKey)
    {
        $mappedStatement = $this->getManager()->getMappedStatement($selectKey->getID());
        $generatedKey = $mappedStatement->executeQueryForObject($connection, $parameter, null);
        if (strlen($prop = $selectKey->getProperty()) > 0) {
            TPropertyAccess::set($parameter, $prop, $generatedKey);
        }
        return $generatedKey;
    }