Self-Referential ManyToMany Convention in CakePHP

前端 未结 2 1344
陌清茗
陌清茗 2021-01-07 10:30

I have an existing data model where I can rename things freely to match CakePHP\'s conventions. I have a type of graph node, where a node can have an arbitrary number of chi

2条回答
  •  情深已故
    2021-01-07 11:17

    As neilcrookes noted, there are some articles on this on the web about doing this in CakePHP. Here is one of them, using User HABTM User (friends) as an example.

    In that linked article, you can ignore everything after the User class definition if you aren't going to be paginating on the model.

提交回复
热议问题