You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have noticed that when the arrayOfObjects has 1 element, the change tracking records are recorded for that element (as expected) but when the array has >1 records, no change tracking is recorded. No other changes to the code. We even debugged the plugin and noticed it gets undefineds when comparing old and new records. Please see below a screenshot from debugging our original project:
I noticed a similar issue report from last year which was closed due to the lack of sample code. here:
I tried to replicate on a sample project but ran into another issue.
Steps I've taken to replicate on sample project
I have taken the sample incidents project and implemented 4 actions createSingle, createMultiple1,2,3.
createSingle uses CQL to create a single record and works as expected - change log entries recorded.
createMultiple2,3 uses CQL to create multiple records in one go. These actions don't work as expected as they don't insert. But, according to CAP docs they shoud as it says INSERT can be passed to srv or db objects and that the call to entries() can have 1 or more entries. This was unexpected and maybe another issue in CAP itself. When calling createMultiple2,3 we get an exception.
createMultiple4 works as expected (creates record and change logs) but is extremely slow if you have 1000s of records as it does multiple single inserts per record which in our real work scenario takes too long and is why we moved to a version that does the inserts with a statement like this one: await INSERT.into(MyEntity).entries(arrayOfObjects) but then runs into the problem that no changelog records are created.
Hi,
Project code to replicate the issue
On our project we have an action that has the following insert statement:
We have noticed that when the arrayOfObjects has 1 element, the change tracking records are recorded for that element (as expected) but when the array has >1 records, no change tracking is recorded. No other changes to the code. We even debugged the plugin and noticed it gets undefineds when comparing old and new records. Please see below a screenshot from debugging our original project:
I noticed a similar issue report from last year which was closed due to the lack of sample code. here:
I tried to replicate on a sample project but ran into another issue.
Steps I've taken to replicate on sample project
I have taken the sample incidents project and implemented 4 actions
createSingle
,createMultiple1,2,3
.createSingle uses CQL to create a single record and works as expected - change log entries recorded.
createMultiple2,3 uses CQL to create multiple records in one go. These actions don't work as expected as they don't insert. But, according to CAP docs they shoud as it says INSERT can be passed to
srv
ordb
objects and that the call to entries() can have 1 or more entries. This was unexpected and maybe another issue in CAP itself. When callingcreateMultiple2,3
we get an exception.createMultiple4
works as expected (creates record and change logs) but is extremely slow if you have 1000s of records as it does multiple single inserts per record which in our real work scenario takes too long and is why we moved to a version that does the inserts with a statement like this one:await INSERT.into(MyEntity).entries(arrayOfObjects)
but then runs into the problem that no changelog records are created.Project code to replicate the issue
versions
We are using CAP 8 and latest change-tracking 1.0.7
Thank you in advance
The text was updated successfully, but these errors were encountered: