0

我正在使用 Zend Framework 和教义 1.2.x 有没有办法在添加 Doctrine Searchable Behaviour 时定义索引表名称?./doctrine build-all-reload 脚本生成奇怪的“model__info_index”表名而不是“info_index”

这是我的配置://shema.yml

Info:
  actAs:
    Searchable:
      fields: [name, body]
  columns:
    id:
      type: integer
      primary: true
      autoincrement: true
    name: string(256)
    body: clob

//应用程序.ini

doctrine.data_fixtures_path = APPLICATION_PATH  "/configs/data/fixtures"
doctrine.sql_path = APPLICATION_PATH  "/configs/data/sql"
doctrine.migrations_path = APPLICATION_PATH  "/configs/data/migrations"
doctrine.yaml_schema_path = APPLICATION_PATH  "/configs/schema.yml"
doctrine.models_path = APPLICATION_PATH  "/models/Model/"
doctrine.generate_models_options.pearStyle = true
doctrine.generate_models_options.generateTableClasses = false
doctrine.generate_models_options.generateBaseClasses = true
doctrine.generate_models_options.baseClassPrefix = "Base_"
doctrine.generate_models_options.baseClassesDirectory = null
doctrine.generate_models_options.classPrefixFiles = false
doctrine.generate_models_options.classPrefix = "Model_"
doctrine.model_autoloading = 2
4

1 回答 1

1

我也想设置索引表名称,但在文档中找不到任何内容。但是,该Versionable行为具有className也设置表名的选项;事实证明,这也适用于Searchable行为:

Info:
  actAs:
    Searchable:
      fields: [name, body]
      className: InfoIndex
  columns:
    id:
      type: integer
      primary: true
      autoincrement: true
    name: string(256)
    body: clob
于 2012-04-10T18:57:24.093 回答