嘗試創建2個包。一個是門戶,另一個是培訓包。我難以掌握的是如何在繼承了訓練包中的實體的門戶束中創建實體(並覆蓋訓練束實體)。Symfony2 Doctrine2在另一個包中繼承實體
PortalBundle
Course Entity Extends TrainingBundle Course
Add a Many to Many Relationship with another PortalBundle Entity
TrainingBundle
Course Entity
One to Many Relationship with Lesson Entity
這甚至可能嗎?我嘗試創建TrainingBundle:Course Entity作爲MappedSuperClass,但這不可行,因爲TrainingBundle:Course實體具有一對多關係。
如果我嘗試只是延長TrainingBundle:。CourseEntity我得到一個錯誤「與名‘課程’已經存在
你是如何映射實體?Yaml,XML,註釋? – Florent 2012-07-24 16:15:43
當前我將它們映射爲註釋 – Heyflynn 2012-07-24 17:38:36