其他持久性框架中是否有类似于 EclipseLink Flex Extensions 的类似功能?
我需要能够向 Java JSF、JPA (JDO) 应用程序中的数据库表添加附加列。
Eclipse Links 通过 Flex 扩展支持这一点。其他 JPA 框架中是否有类似的功能?我不知道休眠。 JDO 的支持也很有趣,因为有一天我想对其进行评估。
感谢您的任何建议。
问候,
安德烈亚斯
I have the need to be able to add additional columns to database tables in a Java JSF, JPA (JDO) application.
Eclipse Links supports this through the Flex Extension. Is there a similar Feature in other JPA Frameworks? I don't know about Hibernate. Also support in JDO would be interesting, as I would like to evaluate it one day.
Thanks for any advice.
Greets,
Andreas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 Hibernate 中,您可以在名为 hibernate.hbm2ddl.auto 的持久性 XML 中设置一个带有值(create | create-drop | update | validate)的属性,让提供者知道您是否要生成 DDL。
当然,这意味着您配置的连接有权在相关数据库中执行 DDL(这在生产数据库中绝不是安全策略):-)
在另一个问题中,有更多信息
Hibernate hbm2ddl.auto 可能的值及其作用?< /a>
In Hibernate you can set a property in the persistence XML named hibernate.hbm2ddl.auto with values (create | create-drop | update | validate) to let the provider know if you want to generate DDL.
Of course, this implies your configured connection has privileges to do DDL in the database in question (which is never a safe policy in a production database) :-)
In this another question there is more info
Hibernate hbm2ddl.auto possible values and what they do?
DataNucleus 显然通过持久性属性(jdo 和 jpa)支持此类模式生成/更新/删除功能,并提供 SchemaTool 允许其预先执行,或在应用之前生成 DDL 供用户编辑
DataNucleus obviously supports such schema generation/update/delete features via persistence properties (jdo and jpa), and provides SchemaTool to allow it to be performed upfront, or to generate DDL for user editing before applying