diff --git a/samples/bookshop/.cdsrc.json b/samples/bookshop/.cdsrc.json
index f419d38..1cb5db6 100644
--- a/samples/bookshop/.cdsrc.json
+++ b/samples/bookshop/.cdsrc.json
@@ -1,14 +1,8 @@
{
"requires": {
"db": "hana",
- "AICore": {
- "model": "@cap-js/ai/srv/AICoreService"
- },
"[production]": {
"auth": "xsuaa"
}
- },
- "cdsc": {
- "moduleLookupDirectories": ["node_modules/"]
}
}
diff --git a/samples/bookshop/package-lock.json b/samples/bookshop/package-lock.json
index 07631da..f14a7fe 100644
--- a/samples/bookshop/package-lock.json
+++ b/samples/bookshop/package-lock.json
@@ -9,7 +9,6 @@
"version": "1.0.0",
"license": "ISC",
"dependencies": {
- "@cap-js/ai": "^1",
"@sap/cds": "^9",
"@sap/cds-common-content": "^1.4.0"
},
@@ -17,21 +16,6 @@
"@sap/cds-dk": "^9.3.2"
}
},
- "node_modules/@cap-js/ai": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@cap-js/ai/-/ai-1.0.1.tgz",
- "integrity": "sha512-QE5JZTvbptGpcpSy+KgSn6IwQuB7ugmNWQ0dpX7OwXjB5MIn2utKKjrkWy0Gs1O0mEJEARl6w519UtZiY30ufQ==",
- "license": "Apache-2.0",
- "workspaces": [
- "tests/*"
- ],
- "engines": {
- "node": ">=20.0.0"
- },
- "peerDependencies": {
- "@sap/cds": ">=9"
- }
- },
"node_modules/@eslint/js": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
diff --git a/samples/bookshop/package.json b/samples/bookshop/package.json
index 60dd5df..f31a742 100644
--- a/samples/bookshop/package.json
+++ b/samples/bookshop/package.json
@@ -8,7 +8,6 @@
"@sap/cds-dk": "^9.3.2"
},
"dependencies": {
- "@cap-js/ai": "^1",
"@sap/cds": "^9",
"@sap/cds-common-content": "^1.4.0"
}
diff --git a/samples/bookshop/pom.xml b/samples/bookshop/pom.xml
index 426758b..75d16f7 100644
--- a/samples/bookshop/pom.xml
+++ b/samples/bookshop/pom.xml
@@ -51,11 +51,6 @@
${cds-starter-ai.version}
-
- com.sap.cds
- cds-feature-recommendations
- ${cds-starter-ai.version}
-
diff --git a/samples/bookshop/srv/ai-core-service.cds b/samples/bookshop/srv/ai-core-service.cds
index 1fc24c8..7124cc4 100644
--- a/samples/bookshop/srv/ai-core-service.cds
+++ b/samples/bookshop/srv/ai-core-service.cds
@@ -1,4 +1,4 @@
-using { AICore } from '@cap-js/ai/srv/AICoreService';
+using { AICore } from 'com.sap.cds/ai';
service AICoreShowcaseService @(requires: 'any') {
diff --git a/samples/bookshop/srv/pom.xml b/samples/bookshop/srv/pom.xml
index 599800e..fad1426 100644
--- a/samples/bookshop/srv/pom.xml
+++ b/samples/bookshop/srv/pom.xml
@@ -55,11 +55,6 @@
cds-starter-ai
-
- com.sap.cds
- cds-feature-recommendations
-
-
org.springframework.security
spring-security-test
diff --git a/samples/bookshop/srv/recommendations.cds b/samples/bookshop/srv/recommendations.cds
new file mode 100644
index 0000000..6efc077
--- /dev/null
+++ b/samples/bookshop/srv/recommendations.cds
@@ -0,0 +1,37 @@
+// Manual SAP_Recommendations model definition.
+// This replaces the compile-time enhancement that @cap-js/ai's cds-plugin.js
+// would normally generate automatically for all draft-enabled entities with
+// value-list fields.
+
+using { AdminService } from './admin-service';
+
+// Virtual entity holding recommendation results for Books.
+// The structure mirrors what the node plugin generates: one arrayed element per
+// value-list field, each containing the standard recommendation sub-elements.
+@cds.persistence.skip
+entity AdminService.Books_Recommendations {
+ key technicalRecommendationsIdentifier : UUID;
+ virtual genre_ID : many {
+ RecommendedFieldValue : Integer;
+ RecommendedFieldDescription : String;
+ RecommendedFieldScoreValue : Decimal;
+ RecommendedFieldIsSuggestion : Boolean;
+ };
+ virtual currency_code : many {
+ RecommendedFieldValue : String(3);
+ RecommendedFieldDescription : String;
+ RecommendedFieldScoreValue : Decimal;
+ RecommendedFieldIsSuggestion : Boolean;
+ };
+}
+
+// Add SAP_Recommendations navigation property to Books.
+// The on-condition is trivial (entity is @cds.persistence.skip, never queried from DB).
+// Use 'extend ... with columns' because AdminService.Books is a projection.
+extend AdminService.Books with columns {
+ SAP_Recommendations : Association to one AdminService.Books_Recommendations
+ on 1 = 1
+}
+
+// Tells Fiori Elements to auto-expand SAP_Recommendations on draft reads.
+annotate AdminService.Books with @UI.Recommendations: SAP_Recommendations;