Skip to Content
0
Jan 13 at 08:12 PM

[cds] - [WARNING] Do not use “@cds.persistence.exists” on an entity

228 Views

Hi!

Could you please explain what does this warning mean?

cds] - [WARNING] db/models/bizent/schema.cds:2:8: Do not use “@cds.persistence.exists” on an entity named “hdw_bizent.adm.data.cdsBizent.Asset” in SAP HANA CDS when we also create a SAP HANA CDS context named “hdw_bizent.adm.data.cdsBizent” (in entity:"hdw_bizent.adm.data.cdsBizent.Asset")

After upgrading to a recent version we started having tons of such messages ( we have around 100 existing tables ). Tables are defined like this:

@cds.persistence.exists 
Entity ![hdw_bizent.adm.data.cdsBizent.Asset] {
key 	![ASSET_ID]: String(100)  @title: 'ASSET_ID: Asset Id' ; 
key 	![ASSET_TYPE]: String(100)  @title: 'ASSET_TYPE: Asset Type' ; 
	![ASSET_NAME]: String(255)  @title: 'ASSET_NAME: Asset Name' ; 
}

and later consume like this ( converting name to a lower case for rest api )

using {hdw_bizent} from './schema';
entity views.hdw_bizent.adm.data.cdsBizent.Asset as projection on hdw_bizent.adm.data.cdsBizent.Asset {
	ASSET_ID as asset_id,
	ASSET_TYPE as asset_type,
	ASSET_NAME as asset_name,
};

the real table name is resolved in synonyms.

What is wrong here and why it is a warning? Won't it appear then later to be an error?

Thanks!