I found a bug with postgreSQL. If you're using postgreSQL's driver, when Respect\Mapper::checkNewIdentity calls PDO::lastInsertId(), it must pass the sequence name as a parameter to this method. Currently, the pk column is setted with postgreSQL OID.