public function lastInsertID()
    {
        if (isset($this->persistence) && $this->persistence instanceof Persistence\SQL) {
            return $this->persistence->connection->lastInsertId($this);
        }

        throw new Exception('Model is not associated with SQL-enabled persistence');
    }
public function lastInsertID()
    {
        if (isset($this->persistence) && $this->persistence instanceof Persistence\SQL) {
            return $this->persistence->connection->lastInsertId($this);
        }

        throw new Exception('Model is not associated with SQL-enabled persistence');
    }
public function lastInsertID ( ) { if ( isset ( $ this -> persistence ) && $ this -> persistence instanceof Persistence \ SQL ) { return $ this -> persistence -> connection -> lastInsertId ( $ this ) ; } throw new Exception ( 'Model is not associated with SQL-enabled persistence' ) ; }
Last ID inserted.

@throws Exception

@return mixed
Last ID inserted .