I'm trying to connect an existing virtual table that I create in Business Application Studio with a CDS entity.
Ex. my VT name is: com.somedomain.virtualtables::VtAaa
This is a convention and it will be checked at deployment time of my project.
Here is my CDS entity definition:
@cds.persistence.exists @readonly entity ![com.somedomain.virtualtables::VtAaa] { key matnr : String(18); key werks : String(4); }<br>
On mvn clean compile I get an error:
[ERROR] Stopped execution due to exception: java.lang.IllegalArgumentException: not a valid name: Virtualtables::VtAaa_ at com.squareup.javapoet.Util.checkArgument (Util.java:53) at com.squareup.javapoet.TypeSpec$Builder.<init> (TypeSpec.java:432) at com.squareup.javapoet.TypeSpec$Builder.<init> (TypeSpec.java:409) at com.squareup.javapoet.TypeSpec.interfaceBuilder (TypeSpec.java:136) at com.squareup.javapoet.TypeSpec.interfaceBuilder (TypeSpec.java:140) at com.sap.cds.generator.writer.ModelWriter.createInterfaceSpecBuilder (ModelWriter.java:239)<br>
So the name of my entity isn't correct and can't be compiled.
I also tried to map my entity with synonym definition to simplify the entity name but then I get errors on HDI deployment that synonym object should contain namespace "com.somedomain.synonyms".