-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Primary keys (Sequence) not setting after save #87
Comments
to solve the problem I wrote a custom class RowGateway with method save.
Originally posted by @Sohorev at zendframework/zend-db#191 (comment) |
You can use the TableGateway feature "SequenceFeature". Originally posted by @froschdesign at zendframework/zend-db#191 (comment) |
Related to #165 Originally posted by @froschdesign at zendframework/zend-db#191 (comment) |
More related to zendframework/zend-db#186 inspired by zendframework/zend-db#172, and in part discussion from zendframework/zend-db#177 because of Originally posted by @alextech at zendframework/zend-db#191 (comment) |
Also appears SequenceFeature cannot be applied to RowGateway, only TableGateway it seems? I will have to add support for that too. Originally posted by @alextech at zendframework/zend-db#191 (comment) |
@alextech Originally posted by @froschdesign at zendframework/zend-db#191 (comment) |
Trying to do that, not understanding how to apply TableGateway to insertion problem. RowGatewayFeature from what see in docs and the test I made (following https://docs.zendframework.com/zend-db/row-gateway/)
do not have this problem because once select query returns data array, follow up update() call already filters out keys specified in first parameter (primary key column name). I do not see how to apply table gateway nor additional features to RowGateway for new data. Another undocumented feature? Can't be because
Originally posted by @alextech at zendframework/zend-db#191 (comment) |
The idea was to add a FeatureSet with the sequence and the RowGateway feature to the TableGateway,
This is why I asked for a check. Thanks for you test! Originally posted by @froschdesign at zendframework/zend-db#191 (comment) |
Welcome :) Originally posted by @alextech at zendframework/zend-db#191 (comment) |
|
My table 'users' have following structure (postgree):
I am write this code
And I have an exeption: While processing primary key data, a known key id was not found in the data array
I try use Pdo_Pgsql and Pgsql driver
Please fix it
Originally posted by @Sohorev at zendframework/zend-db#191
The text was updated successfully, but these errors were encountered: