I want to associate and select the same entity. I can do this for a different entity, but how can I do it for the same entity?
Announcement
Collapse
No announcement yet.
Same entitySame entity relationship
Collapse
X
-
Fields
"careerGroup": {
"type": "link",
"tooltip": true,
"required": true,
"view": "career:views/career-groups/fields/career"
},
"prevCareerStep": {
"type": "link",
"tooltip": true,
"required": true,
"view": "career:views/career-steps/fields/career"
},
"nextCareerStep": {
"type": "link",
"tooltip": true,
"required": true,
"view": "career:views/career-steps/fields/career"
},
Relations
"careerGroup": {
"type": "belongsTo",
"entity": "CareerGroups"
},
"prevCareerStep": {
"type": "belongsTo",
"entity": "CareerSteps"
},
"nextCareerStep": {
"type": "belongsTo",
"entity": "CareerSteps"
},
just careerGroup worked.
example relation photo is attached.
Comment
-
Originally posted by gundogduyakici View PostFields
"careerGroup": {
"type": "link",
"tooltip": true,
"required": true,
"view": "career:views/career-groups/fields/career"
},
"prevCareerStep": {
"type": "link",
"tooltip": true,
"required": true,
"view": "career:views/career-steps/fields/career"
},
"nextCareerStep": {
"type": "link",
"tooltip": true,
"required": true,
"view": "career:views/career-steps/fields/career"
},
Comment
-
What I tried to say you - in entityDefs you defined the field prevCareerStep, on the layout you added prevCareerSteps (s letter in the end). You want to display the field you don't have.
You need link field (singular Step) or linkMultiple (plural Steps)?
Comment
-
Originally posted by tanya View PostWhat I tried to say you - in entityDefs you defined the field prevCareerStep, on the layout you added prevCareerSteps (s letter in the end). You want to display the field you don't have.
You need link field (singular Step) or linkMultiple (plural Steps)?
I want link (singular Step).
Comment
-
I asked you to create such relation in Entity Manager, to see all needed definitions
Code:{ "fields": { "tasksChildren": { "type": "linkMultiple", "layoutDetailDisabled": true, "layoutListDisabled": true, "layoutMassUpdateDisabled": true, "noLoad": true, "importDisabled": true, "isCustom": true }, "nextTask": { "type": "link" } }, "links": { "tasksChildren": { "type": "hasMany", "foreign": "nextTask", "entity": "Task", "audited": false, "isCustom": true }, "nextTask": { "type": "belongsTo", "foreign": "tasksChildren", "entity": "Task", "audited": false, "isCustom": true } } }
Comment
Comment