Skip to content
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

Add support for self-referenced types #55

Open
mattreddy3 opened this issue May 8, 2023 · 0 comments
Open

Add support for self-referenced types #55

mattreddy3 opened this issue May 8, 2023 · 0 comments

Comments

@mattreddy3
Copy link

Hi,

Thanks as always for maintaining this project! Wanted to ask for an enhancement. We sometimes reference field types across entity definitions (not necessarily referencing a distinct type declaration). For example:

entity MyEntity {
  Field1: String; // We will reference this field
  Field2: Integer;
}

entity TypeRefEntity { 
  Field3: MyEntity:Field1; // Should resolve to `String` as type
}

Here is an example of where this currently fails:
image
The error is _a.includes is not a function since _a is not a string as expected.

I'm using cds@6.8.1 - not sure if that is the problem? As a workaroudn I will try to explicitly type these.

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

No branches or pull requests

1 participant