我有一个 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 中不起作用吗?