[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4736?page=c...
]
Steve Ebersole commented on HHH-4736:
-------------------------------------
Mike in relation to your comment on HHH-4664, this issue is really is about the
distinction between java.util.Properties and java.util.Map. Hibernate itself uses a
Properties object for its configuraton. Probably we just need to segment JPA specific
config into a Map<String,Object> and put whatever we are passing into SessionFactory
into a Properties (implied Map<String,String>).
Cannot pass ValidatorFactory into
PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map)
-------------------------------------------------------------------------------------------------------------------
Key: HHH-4736
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4736
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-Beta-2
Reporter: Mike Youngstrom
Assignee: Hardy Ferentschik
The javadocs for
PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map) says:
If a Bean Validation provider is present in the classpath, the container must pass the
ValidatorFactoryinstance in the map with the key
"javax.persistence.validation.factory".
However, all non string values are stripped from the provided Map by
Ejb3Configuration.configure(PersistenceUnitInfo, Map):463,
ConfigurationHelper.overrideProperties() making it impossible to pass a ValidatorFactory
using the "map". Passing a ValidatorFactory into
PersistenceProvider.createEntityManagerFactory(String, Map) works fine since
Ejb3Configuration.configure(String, Map) doesn't strip all non Strings from the map.
As a work around it appears a ValidatorFactory can be passed into the properties of the
PersistenceUnitInfo.
Thanks,
Mike
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira