【发布时间】:2014-08-04 11:41:29
【问题描述】:
我有一个多 maven 模块项目,其中 Module1 包含休眠映射类,其他模块(Module2、Module3、Module4)使用此 Module1 作为依赖项。 因此,所有模块(Module2、Module3、Module4)都会在数据库模式中创建相同数量的表。
<hibernate-configuration>
<session-factory>
<mapping class="com.model.Table1"/>
<mapping class="com.model.Table2"/>
<mapping class="com.model.Table3"/>
<!-- Hundreds of other tables -->
</session-factory>
</hibernate-configuration>
但现在的情况是,我希望 Module3 不创建 Table2。 是否有可能我在 Module3 中添加了一些排除项或一些配置,可以忽略 Table2 创建但确实创建所有其他项。
【问题讨论】: