문제

The question is simple (and maybe silly):

When I create the tables in Postgres, do I have to also create the relations? I ask this because I have used an orm before and had issues with some relations, specially multiple primary keys, so I had to re-do all the db structure with the orm.

I was thinking about having only tables without relations and using cake's $hasMany, $belongsTo variables to manage the relations. will this work?

Thanks in advance.

도움이 되었습니까?

해결책

CakePHP's $hasMany and $belongsTo are accessing the database's relationships. So you have to create them.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top