Closed MichaelFlucher closed 1 month ago
Sample code for many-to-many relationship taken from https://cap.cloud.sap/docs/cds/cdl#for-many-to-many-relationships
Hi Michael,
thanks for reporting this issue and for attaching a minimal reproducible sample! I have prepared a fix for this problem. Feel free to try it out before I merge it.
Best, Daniel
Hi Daniel, I testet it with the sample and also in a bigger project. Works in both cases 👍🏽
Great news! I will then merge the fix and include it in the next release. Thanks for testing
Is there an existing issue for this?
Nature of Your Project
TypeScript
Current Behavior
The generated types of the
SampleService
include an empty typeTeams
and a classTeams
, causing the errorDuplicate identifier 'Teams'.
Expected Behavior
Don't include
export type Teams = {};
or don't cause an typescript errorSteps To Reproduce
Environment
Repository Containing a Minimal Reproducible Example
https://github.com/MichaelFlucher/cds-typer-issue
Anything else?
It works if we don't expose the entity containing the Composition: https://github.com/MichaelFlucher/cds-typer-issue/blob/working-sample/srv/sample-service.cds