bug fix
This commit is contained in:
BIN
log_06_07_v1.txt
Normal file
BIN
log_06_07_v1.txt
Normal file
Binary file not shown.
BIN
log_25_06.txt
Normal file
BIN
log_25_06.txt
Normal file
Binary file not shown.
54
multitenancy/Makefile_20210625145610.mta
Normal file
54
multitenancy/Makefile_20210625145610.mta
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Generated with Cloud MTA Build Tool version 1.1.1
|
||||||
|
version=0.0.1
|
||||||
|
MBT=C:/Users/d025985/AppData/Roaming/npm/node_modules/mbt/unpacked_bin/mbt.exe
|
||||||
|
ifndef p
|
||||||
|
$(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
|
||||||
|
endif
|
||||||
|
target_provided=true
|
||||||
|
ifndef t
|
||||||
|
t="$(CURDIR)"
|
||||||
|
target_provided=false
|
||||||
|
endif
|
||||||
|
ifndef strict
|
||||||
|
strict=true
|
||||||
|
endif
|
||||||
|
ifndef mtar
|
||||||
|
mtar="*"
|
||||||
|
endif
|
||||||
|
modules := $(shell $(MBT) provide modules -d=dev)
|
||||||
|
modules := $(subst ],,$(subst [,,$(modules)))
|
||||||
|
# List of all the recipes to be executed during the build process
|
||||||
|
.PHONY: all pre_validate pre_build validate $(modules) post_build meta mtar cleanup
|
||||||
|
# Default target compile all
|
||||||
|
all: pre_validate pre_build validate $(modules) post_build meta mtar cleanup
|
||||||
|
# Validate mta.yaml
|
||||||
|
pre_validate:
|
||||||
|
@$(MBT) validate -r=${strict} -x="paths"
|
||||||
|
pre_build: pre_validate
|
||||||
|
@$(MBT) project build -p=pre
|
||||||
|
|
||||||
|
|
||||||
|
# Execute module build
|
||||||
|
define build_rule
|
||||||
|
$(1): validate
|
||||||
|
@$(MBT) module build -m=$(1) -p=${p} -t=${t}
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach mod,$(modules),$(eval $(call build_rule,$(mod))))# Create META-INF folder with MANIFEST.MF & mtad.yaml
|
||||||
|
meta: $(modules) post_build
|
||||||
|
@$(MBT) gen meta -p=${p} -t=${t}
|
||||||
|
|
||||||
|
post_build: $(modules)
|
||||||
|
@$(MBT) project build -p=post -t=${t}
|
||||||
|
|
||||||
|
# Validate mta.yaml
|
||||||
|
validate: pre_build
|
||||||
|
@$(MBT) validate -r=${strict}
|
||||||
|
|
||||||
|
# Pack as MTAR artifact
|
||||||
|
mtar: $(modules) meta
|
||||||
|
@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
|
||||||
|
|
||||||
|
cleanup: mtar
|
||||||
|
# Remove tmp folder
|
||||||
|
@$(MBT) clean -t=${t}
|
||||||
54
multitenancy/Makefile_20210625145848.mta
Normal file
54
multitenancy/Makefile_20210625145848.mta
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# Generated with Cloud MTA Build Tool version 1.1.1
|
||||||
|
version=0.0.1
|
||||||
|
MBT=C:/Users/d025985/AppData/Roaming/npm/node_modules/mbt/unpacked_bin/mbt.exe
|
||||||
|
ifndef p
|
||||||
|
$(error platform flag is expected. e.g. use make -f makefile.mta p=cf)
|
||||||
|
endif
|
||||||
|
target_provided=true
|
||||||
|
ifndef t
|
||||||
|
t="$(CURDIR)"
|
||||||
|
target_provided=false
|
||||||
|
endif
|
||||||
|
ifndef strict
|
||||||
|
strict=true
|
||||||
|
endif
|
||||||
|
ifndef mtar
|
||||||
|
mtar="*"
|
||||||
|
endif
|
||||||
|
modules := $(shell $(MBT) provide modules -d=dev)
|
||||||
|
modules := $(subst ],,$(subst [,,$(modules)))
|
||||||
|
# List of all the recipes to be executed during the build process
|
||||||
|
.PHONY: all pre_validate pre_build validate $(modules) post_build meta mtar cleanup
|
||||||
|
# Default target compile all
|
||||||
|
all: pre_validate pre_build validate $(modules) post_build meta mtar cleanup
|
||||||
|
# Validate mta.yaml
|
||||||
|
pre_validate:
|
||||||
|
@$(MBT) validate -r=${strict} -x="paths"
|
||||||
|
pre_build: pre_validate
|
||||||
|
@$(MBT) project build -p=pre
|
||||||
|
|
||||||
|
|
||||||
|
# Execute module build
|
||||||
|
define build_rule
|
||||||
|
$(1): validate
|
||||||
|
@$(MBT) module build -m=$(1) -p=${p} -t=${t}
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach mod,$(modules),$(eval $(call build_rule,$(mod))))# Create META-INF folder with MANIFEST.MF & mtad.yaml
|
||||||
|
meta: $(modules) post_build
|
||||||
|
@$(MBT) gen meta -p=${p} -t=${t}
|
||||||
|
|
||||||
|
post_build: $(modules)
|
||||||
|
@$(MBT) project build -p=post -t=${t}
|
||||||
|
|
||||||
|
# Validate mta.yaml
|
||||||
|
validate: pre_build
|
||||||
|
@$(MBT) validate -r=${strict}
|
||||||
|
|
||||||
|
# Pack as MTAR artifact
|
||||||
|
mtar: $(modules) meta
|
||||||
|
@$(MBT) gen mtar --mtar=${mtar} --target_provided=${target_provided} -t=${t}
|
||||||
|
|
||||||
|
cleanup: mtar
|
||||||
|
# Remove tmp folder
|
||||||
|
@$(MBT) clean -t=${t}
|
||||||
BIN
multitenancy/log_01_07_v1.txt
Normal file
BIN
multitenancy/log_01_07_v1.txt
Normal file
Binary file not shown.
BIN
multitenancy/log_01_07_v2.txt
Normal file
BIN
multitenancy/log_01_07_v2.txt
Normal file
Binary file not shown.
BIN
multitenancy/log_01_07_v3.txt
Normal file
BIN
multitenancy/log_01_07_v3.txt
Normal file
Binary file not shown.
BIN
multitenancy/log_01_07_v4.txt
Normal file
BIN
multitenancy/log_01_07_v4.txt
Normal file
Binary file not shown.
BIN
multitenancy/log_25_06_v2.txt
Normal file
BIN
multitenancy/log_25_06_v2.txt
Normal file
Binary file not shown.
BIN
multitenancy/log_25_06_v3.txt
Normal file
BIN
multitenancy/log_25_06_v3.txt
Normal file
Binary file not shown.
@@ -22,7 +22,7 @@ modules:
|
|||||||
type: nodejs
|
type: nodejs
|
||||||
path: app
|
path: app
|
||||||
build-parameters:
|
build-parameters:
|
||||||
ignore: ["node_modules/"]
|
ignore: ["node_modules/"]
|
||||||
parameters:
|
parameters:
|
||||||
# Keep existing URLs for this application ("routes")
|
# Keep existing URLs for this application ("routes")
|
||||||
keep-existing-routes: true
|
keep-existing-routes: true
|
||||||
@@ -44,8 +44,8 @@ modules:
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
type: nodejs
|
type: nodejs
|
||||||
path: gen/srv
|
path: gen/srv
|
||||||
build-parameters:
|
# build-parameters:
|
||||||
ignore: ["node_modules/"]
|
# ignore: ["node_modules/"]
|
||||||
properties:
|
properties:
|
||||||
SAP_JWT_TRUST_ACL: [{"clientid":"*","identityzone":"sap-provisioning"}] # Trust between server and SaaS Manager
|
SAP_JWT_TRUST_ACL: [{"clientid":"*","identityzone":"sap-provisioning"}] # Trust between server and SaaS Manager
|
||||||
requires:
|
requires:
|
||||||
|
|||||||
3146
multitenancy/package-lock.json
generated
3146
multitenancy/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -6,13 +6,8 @@
|
|||||||
"license": "UNLICENSED",
|
"license": "UNLICENSED",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
<<<<<<< HEAD
|
|
||||||
"@sap/cds": "git+https://b60833c73d12694645300a9e2b54a5650e6951ba:x-oauth-basic@github.tools.sap/cap/cds.git",
|
"@sap/cds": "git+https://b60833c73d12694645300a9e2b54a5650e6951ba:x-oauth-basic@github.tools.sap/cap/cds.git",
|
||||||
"@sap/cds-mtx": "^2",
|
"@sap/cds-mtx": "^2",
|
||||||
=======
|
|
||||||
"@sap/cds": "^5.1",
|
|
||||||
"@sap/cds-mtx": "git+https://dd15a9cc2fa570fa26a4ab135f488ba260d65408:x-oauth-basic@github.wdf.sap.corp/cdx/cds-mtx.git",
|
|
||||||
>>>>>>> ac895a508ab0d84ed46845359fdb0ed7a0f0571f
|
|
||||||
"@sap/hana-client": "^2",
|
"@sap/hana-client": "^2",
|
||||||
"@sap/hdi-deploy": "^4",
|
"@sap/hdi-deploy": "^4",
|
||||||
"@sap/instance-manager": "^2",
|
"@sap/instance-manager": "^2",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ class OrdersService extends cds.ApplicationService {
|
|||||||
init(){
|
init(){
|
||||||
const { Orders_Items:OrderItems } = this.entities
|
const { Orders_Items:OrderItems } = this.entities
|
||||||
|
|
||||||
|
/**
|
||||||
this.before ('UPDATE', 'Orders', async function(req) {
|
this.before ('UPDATE', 'Orders', async function(req) {
|
||||||
const { ID, Items } = req.data
|
const { ID, Items } = req.data
|
||||||
if (Items) for (let { product_ID, amount } of Items) {
|
if (Items) for (let { product_ID, amount } of Items) {
|
||||||
@@ -14,7 +15,9 @@ class OrdersService extends cds.ApplicationService {
|
|||||||
if (amount != before) await this.orderChanged (product_ID, amount-before)
|
if (amount != before) await this.orderChanged (product_ID, amount-before)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
**/
|
||||||
|
|
||||||
|
/**
|
||||||
this.before ('DELETE', 'Orders', async function(req) {
|
this.before ('DELETE', 'Orders', async function(req) {
|
||||||
const { ID } = req.data
|
const { ID } = req.data
|
||||||
const Items = await cds.tx(req).run (
|
const Items = await cds.tx(req).run (
|
||||||
@@ -22,8 +25,10 @@ class OrdersService extends cds.ApplicationService {
|
|||||||
)
|
)
|
||||||
if (Items) await Promise.all (Items.map(it => this.orderChanged (it.product_ID, -it.amount)))
|
if (Items) await Promise.all (Items.map(it => this.orderChanged (it.product_ID, -it.amount)))
|
||||||
})
|
})
|
||||||
|
**/
|
||||||
|
|
||||||
return super.init()
|
return super.init()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** order changed -> broadcast event */
|
/** order changed -> broadcast event */
|
||||||
|
|||||||
Reference in New Issue
Block a user