Doctrine內(nèi)mapped與inversed的問題
大師,請(qǐng)問個(gè)問題,我查了Doctrin的文檔,在這個(gè)連結(jié) http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/unitofwork-associations.html 中。 11.1. Bidirectional Associations寫到OneToMany is always the inverse side of a bidirectional association. Author內(nèi)的$books就是OneToMany,是否應(yīng)該要寫成 inversedBy="author" 呢?先謝謝大師
2015-04-01
看這個(gè)鏈接里http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html
所有關(guān)系的定義都有示范,照著寫就好。
2015-04-03
謝謝洪大師