Merge pull request #207 from SAP-samples/avoid-index.cds

Avoid central index.cds files to ease extensibility
This commit is contained in:
Christian Georgi
2021-03-23 13:08:31 +01:00
committed by GitHub
5 changed files with 3 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
using { AdminService } from '../../db'; using { AdminService } from '../../db/schema';
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
// //

View File

@@ -2,7 +2,7 @@
// Add Author.age and .lifetime with a DB-specific function // Add Author.age and .lifetime with a DB-specific function
// //
using { AdminService } from '..'; using { AdminService } from '../schema';
extend projection AdminService.Authors with { extend projection AdminService.Authors with {
YEARS_BETWEEN(dateOfBirth, dateOfDeath) as age: Integer, YEARS_BETWEEN(dateOfBirth, dateOfDeath) as age: Integer,

View File

@@ -2,7 +2,7 @@
// Add Author.age and .lifetime with a DB-specific function // Add Author.age and .lifetime with a DB-specific function
// //
using { AdminService } from '..'; using { AdminService } from '../schema';
extend projection AdminService.Authors with { extend projection AdminService.Authors with {
strftime('%Y',dateOfDeath)-strftime('%Y',dateOfBirth) as age: Integer, strftime('%Y',dateOfDeath)-strftime('%Y',dateOfBirth) as age: Integer,