【问题标题】:Play 2.2 - Subprojects with multiple databasesPlay 2.2 - 具有多个数据库的子项目
【发布时间】:2014-01-02 16:34:13
【问题描述】:

我有一个 play 2.2.1 应用程序,它有一个嵌套在 /modules/ 目录中的子项目。我想在子项目中定义模型并为这些模型使用单独的数据库。

我的 application.conf 文件是这样定义的:

db.default.driver=org.postgresql.Driver
db.default.url="postgres://user:pw@localhost/default"

db.other.driver=org.postgresql.Driver
db.other.url="postgres://user:pw@localhost/other"

ebean.default="models.*"
ebean.other="submodule.models.*"

当我运行它时,我收到错误消息“PersistenceException: Error with [models.SubmoduleModel] It has not been enhanced but it's superClass [class play.db.ebean.Model] is?(你不能混合单个继承层次结构中的增强)标记[play.db.ebean.Model] className[models.SubmoduleModel]”。

我相信这在 Play 2.1.4 中有效。知道为什么这在 Play 2.2 中不起作用吗?

【问题讨论】:

    标签: database playframework git-submodules playframework-2.2 subproject


    【解决方案1】:

    有传言称这将在 Play 2.4.0 中修复。见here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-07-01
      • 2013-10-24
      • 2021-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多