Respect / Relational

A fluent, intuitive ORM for any relational database engine
http://respect.github.io/Relational
Other
243 stars 32 forks source link

PostgresSQL lastInsertId error #40

Open tuliobraga opened 11 years ago

tuliobraga commented 11 years ago

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.

nickl- commented 10 years ago

@tuliobraga Excuse the late response and thank you for bringing this to our attention.

Please have a look at #44 and give us a short description of your environment and include the results of the unit tests if you can get them to run against PostgreSQL (they use SQLite AFAIK.

We also need to get an idea what changes are required to the tests to make them work against PostgreSQL.

How did you deal with the postgres schemas?

Did you notice any other problems we should look at?