[Hibernate-JIRA] Created: (HHH-4844) OracleDialect incorrectly maps timestamps and dates to Hibernate Date Type
by Brian (JIRA)
OracleDialect incorrectly maps timestamps and dates to Hibernate Date Type
--------------------------------------------------------------------------
Key: HHH-4844
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4844
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.0-Beta-3
Environment: org.hibernate.dialect.OracleDialect
Reporter: Brian
OracleDialect maps an jdbc timestamp type to a hibernate date type, and maps by default, jdbc date type to hibernate org.hibernate.type.DateType. Hibernate Date Type translation uses ResultSet.getDate which means that time is truncated from the date. This is not what you want, you want to include the time. These should use a hibernate TypeStampType. This is what a java.util.Date mapping uses. Right now, you will get different results if running an sql query on the same table vs. a hibernate hql query, it will map to different types. Propose the OracleDialect class do this:
registerColumnType( Types.DATE, Hibernate.TIMESTAMP.getName() );
registerColumnType( Types.TIMESTAMP, Hibernate.TIMESTAMP.getName() );
--
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
16 years, 2 months
[Hibernate-JIRA] Created: (HBX-1074) DelegatingReverseEngineeringStratey.columnToHibernateTypeName reports invalid values
by Joel Schuster (JIRA)
DelegatingReverseEngineeringStratey.columnToHibernateTypeName reports invalid values
------------------------------------------------------------------------------------
Key: HBX-1074
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1074
Project: Hibernate Tools
Issue Type: Improvement
Components: reverse-engineer
Affects Versions: 3.2.1
Environment: MyEclipse w/ Hibernate rev engineering against Oracle 10g
Reporter: Joel Schuster
When implementing an extention to the [u]DelegatingReverseEngineeringStrategy [/u]the [u]columnToHibernateTypeName [/u]does not report the true value of the [b]precision [/b]and [b]scale [/b]column of the table description/definition.
The method signature:
[code]@Override
public String columnToHibernateTypeName( TableIdentifier table, String columnName, int sqlType,
int length, int precision, int scale, boolean nullable,
boolean generatedIdentifier) {[/code]
The precision and scale parameters are [b]int[/b]. If the values in the definition are [b]null[/b] the values reported here come out as DATA_LENGTH and 0. Not null.
These parameters should be [b]Integer[/b] and be set to [b]null [/b]when applicable.
--
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
16 years, 2 months
[Hibernate-JIRA] Created: (HHH-4736) Cannot pass ValidatorFactory into PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map)
by Mike Youngstrom (JIRA)
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
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
16 years, 2 months