Reverting removal of cds.service.providers

This commit is contained in:
Daniel Hutzel
2025-07-24 12:24:11 +02:00
parent 65eccfad33
commit 6dc1da2964

View File

@@ -52,7 +52,7 @@ module.exports = { DataService }
/** @returns {cds.Service} */
function findDataSource(dataSourceName, entityName) {
for (let srv of Object.values(cds.services)) { // all connected services
for (let srv of cds.service.providers) { // all connected services
if (!srv.name) continue // FIXME intermediate/pending in cds.services ?
if (dataSourceName === srv.name || entityName.startsWith(srv.name+'.')) {
log._debug && log.debug(`using ${srv.name} as data source`)