-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] String enum in composition of many potentially not supported #116
Comments
This issue has not been updated in a while. If it is still relevant, please comment on it to keep it open. The issue will be closed soon if it remains inactive. |
Potentially any updates on this? A first step could be just typing them as the base type, e.g. string for now? |
Hi Tobias, sorry for the long silence. I'm afraid there has been no work done on this issue so far.
type hierarchyLevel: String enum {
oneTaggedElementHierarchyLevel
}
entity Something {
key elementGuid: String;
taggedElements: Composition of many hierarchyLevel // Expecting an entity or aspect as composition targetCDS (compiler)(ref-invalid-target)
}
Best EDIT: I have misread your initial example, thanks for pointing that out. The following code works as expected: type hierarchyLevel: String enum {
oneTaggedElementHierarchyLevel
};
entity Something.taggedElements {
hierarchyLevel: hierarchyLevel;
key elementGuid: String;
}
entity Something {
taggedElements: Composition of many Something.taggedElements
} I can reproduce the issue. As users can use a named enum to work around this problem, I'd like to prioritise it fairly low. If you see an immediate solution and think this should be addressed asap, I would welcome any PR. |
Is there an existing issue for this?
Nature of Your Project
TypeScript
Current Behavior
Given cds such as:
The following type is generated:
Yet
taggedElements_hierarchyLevel
is not defined.Expected Behavior
I would've expected
taggedElements_hierarchyLevel
to exist.Steps To Reproduce
No response
Environment
Repository Containing a Minimal Reproducible Example
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: