Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Conversation

@etimr
Copy link
Contributor

@etimr etimr commented Jul 2, 2025

No description provided.

@etimr etimr changed the title Hierarch draft crud Tree Tables: Modifications Jul 10, 2025
@David-Kunz David-Kunz requested a review from danjoa July 10, 2025 10:04
Copy link
Member

@danjoa danjoa left a comment

Choose a reason for hiding this comment

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

See inline comments.

Conflicts with main:
The artificial separation of ./fiori apps has been removed → went into ./bookstore now.

Comment on lines +4 to +6
annotate sap.capire.bookshop.Genres with @fiori.draft.enabled;
annotate AdminService.Genres with @odata.draft.enabled;
annotate AdminService.Genres with @odata.draft.bypass;
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need that here, in admin-books, at all?
And why all three?

Comment on lines 4 to +6
entity Books as projection on my.Books;
entity Genres as projection on my.Genres;
entity Contents as projection on my.Contents;
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to expose that explicitly?
Composition targets are auto-exposed, as part of their roots. Only root entities should be exposed explicitly.

Comment on lines +34 to +43
/** Hierarchically organized entity for Contents */
entity Contents {
key ID : UUID;
name : String;
page : Integer;
parent : Association to Contents;
children : Composition of many Contents on children.parent = $self;
book : Association to Books;
}

Copy link
Member

Choose a reason for hiding this comment

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

We should not pollute our central getting-started sample, but move that to the fiori / bookstore project.

price : Price;
currency : Currency;
image : LargeBinary @Core.MediaType: 'image/png';
contents : Composition of many Contents on contents.book = $self;
Copy link
Member

Choose a reason for hiding this comment

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

We should not pollute our central getting-started sample, but move that to the fiori / bookstore project.

@@ -0,0 +1,64 @@
ID;parent_ID;name;page;book_ID
Copy link
Member

Choose a reason for hiding this comment

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

We should not pollute our central getting-started sample, but move that to the fiori / bookstore project.

/** For displaying lists of Books */
@readonly entity ListOfBooks as projection on Books
excluding { descr };
excluding { descr, contents };
Copy link
Member

Choose a reason for hiding this comment

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

Revert when we move Contents to bookstore

@readonly entity Books as projection on my.Books { *,
author.name as author
} excluding { createdBy, modifiedBy };
} excluding { createdBy, modifiedBy, contents };
Copy link
Member

Choose a reason for hiding this comment

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

Revert when we move Contents to bookstore

action submitOrder ( book: Books:ID, quantity: Integer ) returns { stock: Integer };
event OrderedBook : { book: Books:ID; quantity: Integer; buyer: String };
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Keep empty lines at the end of files

{$Type: 'UI.ReferenceFacet', Label: '{i18n>Details}', Target: '@UI.FieldGroup#Details'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Admin}', Target: '@UI.FieldGroup#Admin'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>General}', Target: '@UI.FieldGroup#General'},
{$Type: 'UI.ReferenceFacet', Label: '{i18n>Translations}', Target: 'texts/@UI.LineItem'},
Copy link
Member

Choose a reason for hiding this comment

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

Please stick to consistent 2-spaces indent in samples

Comment on lines +10 to +11
texts.locale,
} excluding { contents };
Copy link
Member

Choose a reason for hiding this comment

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

Revert when we moved Contents to fiori / bookstore

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants