简体   繁体   English

SonataMediaBundle-媒体和图库之间的关系在哪里定义?

[英]SonataMediaBundle - where are the relations between Media and Gallery defined?

I have installed the bundle and everything is working properly, but I have a question. 我已经安装了捆绑软件,并且一切正常,但是我有一个问题。 Where is the database mapping for the entities? 实体的数据库映射在哪里?

Looking here , in the Entity folder of the bundle, these classes extend each their respective class for the Model folder of the bundle. 在这里 ,在捆绑软件的Entity文件夹中,这些类为捆绑软件的Model文件夹扩展了各自的类。 Looking at the Gallery Model , there are no annotations, so the mapping must be done in Resources/config/doctrine which it is. 查看Gallery模型 ,没有注释,因此必须在Resources/config/doctrine完成映射。

However, the Gallery mapping or the GalleryHasMedia have all of the fields definition except the relation between the entities. 但是, 图库映射或GalleryHasMedia具有除实体之间的关系以外的所有字段定义。

Is the relation created automatically? 关系是自动创建的吗? And how? 如何? Or is it somewhere else and I've missed it? 还是在其他地方,我错过了?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM