[hibernate-dev] New feature: Configuring “hibernate.hbm2ddl.auto” at entity level?

Emmanuel Bernard emmanuel at hibernate.org
Tue Oct 23 10:53:54 EDT 2012


Hi Julien,

We don't have any specific plan but that looks like a nice feature to
start contributing. It's fairly focused. The only hard part is that you
will probably need to involve the metamodel which is being changed
between 4.x and 5.

Emmanuel

On Mon 2012-10-22 13:57, Julien Martin wrote:
> Hello,
> 
> I currently use the hibernate.hbm2ddl.auto property with a value of create.
> 
> While this setting is very convenient for some entities, I also have an
> entity that is not going to change (i.e. reference data such as postcodes)
> and that contains some data that I would like to keep across restarts of
> the app server (i.e. Tomcat).
> 
> I am seeking for a way to tell hibernate/JPA not to touch this entity/table
> whatever the value of thehibernate.hbm2ddl.auto property.
> 
> Is it possible to configure the value of this property at the level of an
> entity and therefore override the overall behavior for a specific entity?
> 
> This would be a wonderful feature for entities that represent reference
> tables/data.
> 
> Please let me know if you are planning on implementing such a feature in
> upcoming versions of Hiberrnate/EntityManager.
> 
> Regards,
> 
> Julien.
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list