Hello,
Let's say we have EntityA, EntityB and another EntityC. How do I create a notStorable field link to EntityC in EntityA so that it can be displayed and sorted in list view. (Assume I define a loader to set its id and name).
Custom/Resources/metadata/entityDefs/EntityA.json
Custom/Resources/metadata/entifyDefs/EntityB.json
Let's say we have EntityA, EntityB and another EntityC. How do I create a notStorable field link to EntityC in EntityA so that it can be displayed and sorted in list view. (Assume I define a loader to set its id and name).
Custom/Resources/metadata/entityDefs/EntityA.json
Code:
{
"fields": {
"entityB": {
"type": "link",
"isCustom":true,
},
"links": {
"entityB": {
"type": "belongsTo",
"foreign": "entityAs",
"entity": "EntityB",
"isCustom": true
},
}
},
Custom/Resources/metadata/entifyDefs/EntityB.json
Code:
{
"fields": {
"entityAs": {
"type": "linkMultiple",
"isCustom":true,
},
"entityC": {
"type": "link",
"isCustom": true,
},
},
"links": {
"entityAs": {
"type": "hasMany",
"foreign": "entityB",
"entity": "EntityA",
"isCustom": true
},
"entityC": {
"type": "belongsTo",
"foreign": "entityBs",
"entity": "EntityC",
"isCustom": true
},
}
}

Comment