I want to describe a self reference relation in a Liferay entity. Is there a recommended way to do this ?
I want to do this in order to describe a hierarchy.
At the moment, I just added a new column which I called "parentId" and I will save there the ID of the row that will be the parent of this one. If I use the "Diagram view", from within eclipse, if I draw a self reference relationship it adds a new row that duplicated the name of the ID: for example, suppose I want to describe an employee hierarchy - I have an Employee
entity on which I add the default fields; one of these fields is the employeeId
field which will be also the primary key. Now, if I draw a self reference relationship, the IDE will add another field entry that will be named the same way (eg. employeeId
)
question from:
https://stackoverflow.com/questions/66068577/liferay-service-builder-is-there-a-recommended-way-to-describe-a-self-referenc 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…