【发布时间】:2014-10-26 19:13:47
【问题描述】:
作为 Spring Roo 指导 here 在模式上执行 DBRE,我们有以下命令来生成实体及其相关文件。
我们可以在参数--activerecord 或--repository 之间进行选择;选择后者将忽略第一个。
我的问题是两者有什么区别?
roo> 数据库逆向工程师 --schema DbSchemaName --package ~.domain --activeRecord --存储库 --service --testAutomatically --enableViews --includeTables --excludeTables --includeNonPortableAttributes --disableVersionFields --disableGeneratedIdentifiers
使用 --activeRecord 选项创建“Active Record”实体 (如果未指定则默认)。
使用 --repository 选项创建 Spring Data JPA 存储库 每个实体。如果指定为 true,则 --activeRecord 选项为 忽略。
【问题讨论】:
标签: jpa activerecord repository spring-roo dbref