Reputation: 63646
Task:
columns:
name: string(100)
parent_id: integer
relations:
Parent:
class: Task
local: parent_id
foreign: id
foreignAlias: Subtasks
Upvotes: 1
Views: 293
Reputation: 418
See http://www.doctrine-project.org/documentation/manual/1_1/hu/hierarchical-data
Task:
actAs: [NestedSet]
columns:
name: string(100)
You don't need to care about an parent id or anything, doctrine does the bookkeeping for you.
Upvotes: 1