Hello everyone,
I used the solution on this page to insert a data on the specific table:
But when I add a data from this query, the id generated is spaced as 30 value.
On the table I was added pksequence sql (pkSequence="deliveryRichSmsId") which allows you to increment the id to +1. (the sql was executed) :
SELECT CreateSequenceIfNecessary('deliveryRichSmsId', '1000', 'cache 1');
var result = sqlExec("INSERT INTO RenDeliveryRichSms (iDeliveryRichSmsId) VALUES (nextval('deliveryRichSmsId'))");
With sqlExec() the value set up to +1
but I need to use the solution with ".save()" function to get the id generated.
=> The .save() spaces the id by +30 on each insertion.
Do you know if there is a solution to this?
Best regards,
Ali
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @AB_93
It is recommended to not increment the counter by 1. The space is to allow the multiple ingestion at once otherwise it could create the duplicate key issue.
Could you please share more details on the use case?
Hello @AB_93
It is recommended to not increment the counter by 1. The space is to allow the multiple ingestion at once otherwise it could create the duplicate key issue.
Could you please share more details on the use case?
Hi @AB_93,
Was the given solution helpful in navigating through your issue or do you still have the problem? Please share more details if you are still facing the issue.
Thanks!
Views
Replies
Total Likes