【问题标题】:spring roo Error not annotated with @RooDbManagedspring roo 错误未使用 @RooDbManaged 注释
【发布时间】:2014-07-15 01:34:49
【问题描述】:

我正在使用现有数据库创建带有 spring roo 的项目。但是数据库逆向工程师 commond 给了我一些关于一对多映射字段的错误。

我的 spring roo 命令

database reverse engineer --schema transit --package ~.domain

 Created ROOT\src\main\resources\dbre.xml
 Updated ROOT\pom.xml
 Undo manage ROOT\src\main\resources\META-INF\persistence.xml
 Undo manage ROOT\pom.xml
 Undo create ROOT\src\main\resources\dbre.xm`
 Attempted to create one-to-many mapped-by field 'directionPlaces' in       '  lk.transit.web.admin.domain.Direction'  but type for table 'direction_place.no-schema- required' could not be found or is not database managed (not annotated with    @RooDbManaged)

【问题讨论】:

    标签: java mysql spring spring-roo


    【解决方案1】:

    引用的表似乎不在传输模式中。

    【讨论】:

    • directionPlaces 表位于传输模式中。
    • 数据库中是否定义了外键约束?
    • 还要检查用户对“direction_place”表的权限。
    【解决方案2】:

    当我手动创建一个与我试图包含在 dbre 命令中的表同名的类时,这发生在我身上。有趣的是,我注意到了问题,删除了类,但 roo 仍然无法成功执行 dbre 命令,直到我退出 roo shell 并重新启动它-

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-20
      • 1970-01-01
      • 2020-08-17
      • 2011-07-18
      相关资源
      最近更新 更多