I added the code in the existing, but empty, file Zend/Db/Adapter/Driver/Pgsql/Feature/SequenceHelper.php + unit tests.
You can find usage examples there https://github.com/geelweb/zf2-db-tests, I tested 3 use cases :
Add PostgreSQL sequence management
use runtimeexception + check the pk is not null
Add unit test for Pgsql Sequence Feature
Merge branch 'handle-postgres-sequences' of https://github.com/geelwe…
…b/zf2 into handle-postgres-sequences
I am running into this problem, too, and would like to see it fixed.
For my case, I added single quotes around the SELECT NEXTVAL() statement.
IIRC, this may be implemented on the develop branch currently, as sequence support was added for Oracle, which was also found to be suitable for DB2. @ralphschindler can you confirm?
This has been addressed in develop with the addition of the SequenceFeature for Zend\Db\TableGateway\Feature\SequenceFeature
I see, but I am using develop. ZF2 + PostgreSQL 9.1, and it doesn't work.
I was going to try to run the unit tests, but I found none for SequenceFeature. Do you mind if I write some?