Conversation
Contributor
There was a problem hiding this comment.
The PR introduces two significant bugs in create.js: a shared-state mutation via Object.assign on entity.keys, and an inverted ternary condition that causes the wrong result to be returned after an insert. The delete.js and update.js changes look correct for the new affected API shape.
PR Bot Information
Version: 1.20.51
- LLM:
anthropic--claude-4.6-sonnet - Event Trigger:
pull_request.opened - Correlation ID:
0172d97f-8c62-4113-b7c6-3c082286da77 - File Content Strategy: Full file content
Co-authored-by: hyperspace-insights[bot] <209611008+hyperspace-insights[bot]@users.noreply.github.com>
schwma
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chore: Support
[affected]Array Format in CRUD ResolversRefactor
♻️ Updated the CRUD resolvers (
create,update,delete) to handle the new[affected]array format returned by CDS, replacing the previousaffectedRows-based result structure.Changes
lib/resolvers/crud/create.js: Extracted a helper function_only_keysto check if result data contains only entity key fields (includingIsActiveEntity). Updated result handling to checkArray.isArray(result) && 'affected' in resultinstead oftypeof result === 'object' && 'affectedRows' in result. Simplified the conditional logic for determining whether to use the request data or the result directly.lib/resolvers/crud/delete.js: Updated result handling to extractresult.affectedinstead ofresult.affectedRowswhen the result is an array with anaffectedproperty.lib/resolvers/crud/update.js: Updated result handling to use the new[affected]array check, and replacedresult.data ?? cdsReq.datawithresult.length ? result : cdsReq.datato determine the correct return value.PR Bot Information
Version:
1.20.517af88f27-a399-4d8f-9cb1-231d7fb77074pull_request.editedanthropic--claude-4.6-sonnet