Skip to content

Conversation

@lisajulia
Copy link
Contributor

@lisajulia lisajulia commented Nov 6, 2025

This PR possibly fixes: #526

The ActiveEntityModifierFlattener is used in the DraftCancelAttachmentsHandler to construct SELECT queries
from a DELETE statement. The problem was: when
"fiori": {
"draft_messages": true
}
then the UI sends refs with multiple segments which are transformed to a working
SELECT statement with the ActiveEntityModifierFlattener.

I've also added a comment to the method DraftCancelAttachmentsHandler:isWhereEmpty; this function verifies that we are really cancelling a draft and not doing sth else.
I'm not entirely sure if this function is returning the correct value for the SDM plugin, for cds-feature-attachments it is behaving correctly as far as I can tell now.

@lisajulia lisajulia force-pushed the fix-deletion-error branch 2 times, most recently from 6ece6a4 to e25344a Compare November 6, 2025 11:36
@lisajulia lisajulia force-pushed the fix-deletion-error branch 2 times, most recently from 16e0372 to e8d63f6 Compare November 7, 2025 16:16
@lisajulia lisajulia changed the title Add check 'skipBeforeDraftCancel' to processBeforeDraftCancel method,… Change ActiveEntityModifier to ActiveEntityModifierFlattener Nov 7, 2025
@lisajulia lisajulia requested a review from beckermarc November 7, 2025 16:17
@lisajulia lisajulia marked this pull request as ready for review November 7, 2025 16:18
This is used in the DraftCancelAttachmentsHandler to construct SELECT queries
from a DELETE statement, when
"fiori": {
    "draft_messages": true
}
then the UI sends refs with multiple segments which we transform to a working
SELECT statement with the ActiveEntityModifierFlattener.
@lisajulia lisajulia marked this pull request as draft November 7, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleting attachment does not work for certain "fiori": {"draft_messages": true / false } setting

3 participants