1

I am creating a custom plugin, and am trying to keep all related model files contained within the plugin directory structure. However, when I build the model, some files get dropped into lib/model/doctrine/... and others in plugins/userPlugin/lib/model/... . According to Doctrine docs I can add a "package" option to the schema.yml file, and generated model files will be created in the location as defined by my dot-notation entry, for example:

# plugins/userPlugin/config/doctrine/schema.yml

connection: store-rw-user

options:
  # Fully expect resulting model files to be dropped in this directory (vs the main model dir)
  package: userPlugin.lib.model.doctrine

....

As mentioned, this config setup still results in model files being dropped into the main lib/model/doctrine directory. I even tried this, to no avail:

# plugins/userPlugin/config/doctrine/schema.yml

connection: store-rw-user

options:
  package: userPlugin
  package_custom_path: /tmp/userPlugin

....

Just wanted to see if the files were dropped in the /tmp directory, but they were not.

Before I start tearing apart the source code, I figured I would ask first, to see if there is something I am missing.

4

1 回答 1

2

构建后在项目目录中获取模型文件是完全正常的。这样做的目的是让您在每个项目的基础上自定义插件模型,因为这些文件中的类继承自插件文件中定义的类。我也使用插件,而且大多数时候,我编写的所有代码都驻留在插件的模型文件中。

于 2012-11-27T22:30:25.287 回答