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. The below code works if I set entityCId and entityCName in a listLoader but sorting it doesn't work?
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. The below code works if I set entityCId and entityCName in a listLoader but sorting it doesn't work?
Custom/Resources/metadata/entityDefs/EntityA.json
Code:
{ "fields": { "entityB": { "type": "link", "isCustom":true, }, "entityC": { "notStorable": true, "readOnly":true, "type": "linkOne", "isCustom":true, } }, "links": { "entityB": { "type": "belongsTo", "foreign": "entityAs", "entity": "EntityB", "isCustom": true }, "entityC":{ "type": "hasOne", "entity": "EntityC", "skipOrmDefs": 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 }, } }