parentid

How can I set parent-child relation on same table using ActiveRecord?

How can I set parent-child relation on same table? Id int, title string, ParentId int ---> this is refer to Id ...

JPA map relation entity parentID...

Hello, could someone help me to understand how can I define an entity with JPA mapping that has a relation with it self? For example, my entity is CompanyDivision, divisionA contains divisionB, divisionC and divisionB contains divisionB1, divisionB2 divisionA divisionB divisionB1 divisionB2 d...