Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

XSDS - target is undefined - $importEntity fails when there a type referring to another type

$
0
0

Hi!

 

I'm trying to use XSDS to $importEntity a CDS table (hdbdd artifact) which contains two columns, like below:

 

using my.package::global_types;
// (...)
type ty_my_description: global_types.ty_description;
// (...)
@Catalog.tableType: #COLUMN  entity TABLE1{  key id_a: ty_id;  description: ty_my_description;  };

As you can see, column description uses a local type which refers to another type defined in another HDBDD file, responsible for maintaining global types.

 

Here is my import definition:

 

var tab1 = XSDS.$importEntity("my.package", "cds_file.TABLE1");

This throws an error:

 

target is undefined

 

The same error happens for any $importEntity on a table which is associated with the table above.

 

After a lot of trial an error I realized the $importEntity works well if I directly use the global_types.ty_description inside the column definition. But as I think XSDS should handle that, I would like to know how I could import an entity created as the scenario above.

 

It seems XSDS lib thinks there is an association on a column which just usesd a type referring to another type.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>