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?
Same entitySame entity relationship
Collapse
X
-
Tags: None
-
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
-
Layout
[
{
"label": "",
"rows": [
[
{
"name": "name"
},
{
"name": "careerGroup"
}
],
[
{
"name": "prevCareerSteps"
},
{
"name": "nextCareerSteps"
}
],
[
{
"name": "paymentPeriod"
}
]
]
}
]
There is.Comment
-
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"
},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
-
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
-
I want Career Steps data to come in prevCareerSteps and nextCareerSteps while I am in the Career Steps area.
Is this the code you are going to do this? Right ?Comment
-
Comment