[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6938) Clarify the use of getHibernateConfiguration and Configuration handling with JPA bootstrap

Stephane Nicoll (JIRA) noreply at atlassian.com
Thu Jan 5 04:49:09 EST 2012


Clarify the use of getHibernateConfiguration and Configuration handling with JPA bootstrap
------------------------------------------------------------------------------------------

                 Key: HHH-6938
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6938
             Project: Hibernate Core
          Issue Type: Task
    Affects Versions: 3.6.5
            Reporter: Stephane Nicoll


Hi,

I am willing to register custom types automatically when our application starts. We are using JPA2 and the EntityManager.

To do so I can use a method on the Configuration object (registerTypeOverride). When configuring the JPA container, the PersistenceProvider can be extended. That's what I am doing but I came to this code (Ejb3Configuration on 3.6.5)

{code:java}
       /**
	 * This API is intended to give a read-only configuration.
	 * It is sueful when working with SchemaExport or any Configuration based
	 * tool.
	 * DO NOT update configuration through it.
	 */
	public AnnotationConfiguration getHibernateConfiguration() {
		//TODO make it really read only (maybe through proxying)
		return cfg;
	}
{code}

I believe there is a TODO here that may lead to a change that would disallow me to use the configuration object to register new types on startup. If this TODO gets ever resolved (why?), what could I do to register new types? 

Thanks

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list