Similar Feature like EclipseLink Flex Extensions in other Persistence Frameworks?
I have the need to be able to a开发者_如何学JAVAdd 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,
AndreasIn 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 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
精彩评论