Skip to content

Use @hierarchy annotation#601

Merged
agoerler merged 15 commits into
mainfrom
hierarchyAnnotaion
May 11, 2026
Merged

Use @hierarchy annotation#601
agoerler merged 15 commits into
mainfrom
hierarchyAnnotaion

Conversation

@agoerler
Copy link
Copy Markdown
Contributor

No description provided.

@eugene-andreev
Copy link
Copy Markdown
Contributor

I've discussed the problem with @hierarchy and drafts with Elena, she will have a look, why the EDMX differs

@eugene-andreev
Copy link
Copy Markdown
Contributor

eugene-andreev commented Jan 29, 2026

Checked once again in a call with Elena:

  1. We've forgotten to do the change
  2. Removing package-lock.json and node_modules and rebuild helped to solve the issue.

Now both read and write for Genres are working fine

@eugene-andreev
Copy link
Copy Markdown
Contributor

Testing Book->contents.

  • Read mode: OK
  • Edit mode:
SQL:
SELECT T1."BOOK_ID" as "@cds4j:fk:book_ID",
    T1."ID",
    T1."NAME",
    T1."PAGE",
    T1."PARENT_ID",
    T1."BOOK_ID",
    TRUE as "IsActiveEntity",
    FALSE as "HasActiveEntity",
    T1."HASDRAFTENTITY",
    T1."DRAFTADMINISTRATIVEDATA_DRAFTUUID",
    T1."LIMITEDDESCENDANTCOUNT",
    T1."DISTANCEFROMROOT",
    T1."DRILLSTATE",
    T1."LIMITEDRANK"
FROM "ADMINSERVICE_BOOKS" T0
    INNER JOIN (
        SELECT ACTIVE.*,
            COALESCE(DRAFT.HasActiveEntity, false) as HasDraftEntity,
            DRAFT.DraftAdministrativeData_DraftUUID as DraftAdministrativeData_DraftUUID
        from "ADMINSERVICE_CONTENTSHIERARCHY" ACTIVE
            left outer join "ADMINSERVICE_CONTENTSHIERARCHY_DRAFTS" DRAFT on ACTIVE."ID" = DRAFT."ID"
    ) T1 ON (T1."BOOK_ID" = T0."ID")
    and (T0."ID" = ?)

results in

Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "T1.LIMITEDDESCENDANTCOUNT" not found;

@eugene-andreev
Copy link
Copy Markdown
Contributor

There is still an issue in 4.8.1 with the error: Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "MY.SIBLINGRANK" not found
Tested with 4.9.x - works

@eugene-andreev eugene-andreev marked this pull request as ready for review April 23, 2026 11:56
};

annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchyActions #GenreHierarchy: {
annotate AdminService.GenreHierarchy with @Hierarchy.RecursiveHierarchyActions #GenreHierarchyHierarchy: {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid the duplicate HierarchyHierarchy

$Type : 'UI.PresentationVariantType',
Visualizations : ['@UI.LineItem'],
RecursiveHierarchyQualifier: 'GenreHierarchy'
RecursiveHierarchyQualifier: 'GenreHierarchyHierarchy'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid the duplicate HierarchyHierarchy

"@com.sap.vocabularies.UI.v1.LineItem": {
"tableSettings": {
"hierarchyQualifier": "GenreHierarchy",
"hierarchyQualifier": "GenreHierarchyHierarchy",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should avoid the duplicate HierarchyHierarchy

@agoerler agoerler enabled auto-merge (squash) May 11, 2026 12:49
@agoerler agoerler disabled auto-merge May 11, 2026 12:49
@agoerler agoerler merged commit 20c7034 into main May 11, 2026
2 checks passed
@agoerler agoerler deleted the hierarchyAnnotaion branch May 11, 2026 13:36
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.

3 participants