rocknrolla777/loopback-cascade-delete-mixin

While deleting a inner instance with self relation returns code 204

Opened this issue · 0 comments

I have a relation named Reportee for a person model ,
while deleting a person with no Reportee it returns response code 204 with no count

{
"_id": "employeePayroll2",
"name": "Person",
"plural": "Persons",
"base": "PersistedModel",
"persistedModel": true,
"strict": false,
"public": true,
"idInjection": false,
"options": {
"validateUpsert": true
},
"properties": {
"personName": {
"required": false,
"label": "",
"type": "string",
"isArray": true,
"propertyName": "personName",
"id": false,
"index": false,
"description": "",
"displayInView": true,
"minLength": 0,
"maxLength": 30,
"regExp": "",
"defaultVal": ""
}
},
"relations": {
"Reportee":{
"type":"hasMany",
"model":"Person",
"foreignKey":"reportsTo"
},
"manager":{
"type":"belongsTo",
"model":"Person",
"foreignKey":"reportsTo"
}
},
"mixins": {
"CascadeDelete": {
"relations": ["Reportee"]
}
},
"acls": [],
"methods": {},
"dataSource": "remoteMongoDB"
}