[Hibernate-JIRA] Updated: (HHH-1851) relax special handling of 'id' property
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851?page=c... ]
Gail Badner updated HHH-1851:
-----------------------------
Fix Version/s: (was: 3.5.3)
3.5.x
> relax special handling of 'id' property
> ---------------------------------------
>
> Key: HHH-1851
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1851
> Project: Hibernate Core
> Issue Type: Improvement
> Components: query-hql
> Environment: independent, all versions all databases.
> Reporter: Gunther Schadow
> Assignee: Steve Ebersole
> Fix For: 3.5.x
>
> Attachments: IdClassAndAnotherPropertyNamedId.zip
>
>
> Hibernate has long treated 'id' in a special manner in HQL and Criteria queries. The drawback to this has always been that it effectively means users cannot define non-identifier properties named id and refer to those properties in HQL/Criteria queries.
> Thus, I will change this such that:
> (1) 'id' can still be used to refer to the identifier property, whatever the property's actual name, as long as the entity does not define a non-identitifer property named id.
> (2) if the entity defines a non-identifier property named 'id', using 'id' in HQL or Criteria queries will refer to this non-identifier property; users would need to refer to the identifier property by its actual name.
> FYI, the original reason for this feature was to support entity's which did not define an identifier property at all (users were responsible for managing the ids seperately. That feature was never really recommended and has been deprecated since early in the 3.x development.
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HBX-1164) It is good to have more options on the wizard when we say, Source -> Apply Hibernate/JPA annotations
by Dhana kumar Anem (JIRA)
It is good to have more options on the wizard when we say, Source -> Apply Hibernate/JPA annotations
----------------------------------------------------------------------------------------------------
Key: HBX-1164
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1164
Project: Hibernate Tools
Issue Type: New Feature
Components: consoleconfiguration
Reporter: Dhana kumar Anem
Hi,
It's really nice to work when we need DDL for the designed Entities using Dali JPA GUI.
There are few options available(Enable optimistic locking, etc.,) in the wizard when I click Source -> Apply Hibernate/JPA annotations.
It would be nice if custom naming strategy available.
For example, for the field name, firstName, I need PSE01_EMP_FRST_NM as a column name.
where, PSE01_EMP is the column prefix, FRST_NM is the name without vowels(removed a,e,i,o,u).
So, in the wizard,if more options taken from user, like, Table prefix, column prefix, want to remove vowels?
can you please suggest if I missed something.
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-4036) EntityMetamodel entityNameByInheritenceClassNameMap field used inconsistently
by Jeremy Stone (JIRA)
EntityMetamodel entityNameByInheritenceClassNameMap field used inconsistently
-----------------------------------------------------------------------------
Key: HHH-4036
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4036
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.2
Reporter: Jeremy Stone
After upgrading (from 3.3.0.SP1) to 3.3.2.GA we have started getting the follow stack trace logged:
org.hibernate.HibernateException: Unable to resolve entity name from Class [com.cyclone.netPrefect.admin.restriction.complex.TimeSpanRestrictionItemEntity] expected instance/subclass of [RestrictionItem]
at org.hibernate.tuple.entity.PojoEntityTuplizer.determineConcreteSubclassEntityName(PojoEntityTuplizer.java:363)
at org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java:3643)
at org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1375)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:203)
at org.hibernate.event.def.AbstractSaveEventListener.getEntityState(AbstractSaveEventListener.java:535)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:103)
... etc, etc
The com.cyclone.netPrefect.admin.restriction.complex.TimeSpanRestrictionItemEntity is mapped (with entity name TimeSpanRestrictionItem) as a joined subclass of the entity named RestrictionItem.
I have had a look at the Hibernate source for 3.3.2.ga and it looks like problem is the way that the org.hibernate.tuple.entity.EntityMetamodel is using it entityNameByInheritenceClassNameMap field:
* Puts to the map are based on PersistentClass.getMappedClass() as a key - a Class object
* Gets from the map (in findEntityNameByEntityClass method) are using the class name
Presumably (given the name of the map field) both put and get should be using the class name.
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-5192) Can't use group_concat in mysql without creating a custom function
by Douglas Ferguson (JIRA)
Can't use group_concat in mysql without creating a custom function
------------------------------------------------------------------
Key: HHH-5192
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5192
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.1
Environment: Linux, Mysql
Reporter: Douglas Ferguson
After upgrading we starting getting the exception below and had to register a "custom" function..
Caused by: org.hibernate.HibernateException: Unable to locate mapping for function named [group_concat]
at org.hibernate.criterion.AggregateProjection.getFunction(AggregateProjection.java:93)
at org.hibernate.criterion.AggregateProjection.getFunction(AggregateProjection.java:85)
at org.hibernate.criterion.AggregateProjection.getTypes(AggregateProjection.java:64)
at org.hibernate.criterion.ProjectionList.getTypes(ProjectionList.java:61)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getProjectedTypes(CriteriaQueryTranslator.java:362)
at org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:101)
at org.hibernate.loader.criteria.CriteriaJoinWalker.<init>(CriteriaJoinWalker.java:83)
at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:92)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1687)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-5273) RowCountProjection long to int cast exception
by Pamir Erdem (JIRA)
RowCountProjection long to int cast exception
---------------------------------------------
Key: HHH-5273
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5273
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.2
Environment: hibernate-core 3.5.2
Reporter: Pamir Erdem
After we upgraded our hibernate.jar from 3.3.2 to 3.5.2 the methods which executes rowcount functions have started to throw long to cast exception.
>From the source code of hibernate, it is clear that for the features which will be implemented in 3.6
some implementations are changed.
#http://opensource.atlassian.com/projects/hibernate/browse/HHH-5138
In 3.3.2
{code:title=RowCountProjection.java|borderStyle=solid}
public Type[] getTypes(Criteria criteria, CriteriaQuery criteriaQuery)
throws HibernateException {
return new Type[] { Hibernate.INTEGER };
}
{code}
In 3.5.2
{code:title=RowCountProjection.java|borderStyle=solid}
return new Type[] {
getFunction( criteriaQuery ).getReturnType( null, criteriaQuery.getFactory() )
};
{code}
But the definitions of the rowcount functions in both versions in same in Dialect.java
{code}
static {
STANDARD_AGGREGATE_FUNCTIONS.put(
"count",
new StandardSQLFunction("count") {
public Type getReturnType(Type columnType, Mapping mapping) {
return Hibernate.LONG;
}
public String render(List args, SessionFactoryImplementor factory) {
if ( args.size() > 1 ) {
if ( "distinct".equalsIgnoreCase( args.get( 0 ).toString() ) ) {
return renderCountDistinct( args );
}
}
return super.render( args, factory );
}
{code}
By this minor change in 3.5.2 all the project tests which executes count sql function are failing by throwing class cast exception
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-5307) "SettingsFactory" no longer checks for presence of "supportsGetGeneratedKeys" before calling it
by Weinan Xiong (JIRA)
"SettingsFactory" no longer checks for presence of "supportsGetGeneratedKeys" before calling it
-----------------------------------------------------------------------------------------------
Key: HHH-5307
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5307
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.5.2
Reporter: Weinan Xiong
Same issue occured again like HHH-5017. The Hibernate version is 3.5.2.
When I am using DB2 type 2 driver, I will get the following error:
Initial SessionFactory Creaion Failed.java.lang.AbstractMethodError
The temperate solution will add this property into xxx.cfg.xml file:
hibernate.temp.use_jdbc_metadata_defaults= false.
When you look at the source code for SettingsFactory, you can tell the supportsGetGeneratedKeys has never been checked before getting call.
boolean useJdbcMetadata = PropertiesHelper.getBoolean( "hibernate.temp.use_jdbc_metadata_defaults", props, true );
if ( useJdbcMetadata ) {
try {
Connection conn = connections.getConnection();
try {
DatabaseMetaData meta = conn.getMetaData();
log.info( "RDBMS: " + meta.getDatabaseProductName() + ", version: " + meta.getDatabaseProductVersion() );
log.info( "JDBC driver: " + meta.getDriverName() + ", version: " + meta.getDriverVersion() );
dialect = DialectFactory.buildDialect( props, conn );
jdbcSupport = JdbcSupportLoader.loadJdbcSupport( conn );
metaSupportsScrollable = meta.supportsResultSetType( ResultSet.TYPE_SCROLL_INSENSITIVE );
metaSupportsBatchUpdates = meta.supportsBatchUpdates();
metaReportsDDLCausesTxnCommit = meta.dataDefinitionCausesTransactionCommit();
metaReportsDDLInTxnSupported = !meta.dataDefinitionIgnoredInTransactions();
metaSupportsGetGeneratedKeys = meta.supportsGetGeneratedKeys();
}
catch ( SQLException sqle ) {
log.warn( "Could not obtain connection metadata", sqle );
}
finally {
connections.closeConnection( conn );
}
}
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-5098) AssertionFailure thrown when collection contains a parameterized type
by Kahli Burke (JIRA)
AssertionFailure thrown when collection contains a parameterized type
---------------------------------------------------------------------
Key: HHH-5098
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5098
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-Final
Reporter: Kahli Burke
Attachments: patch.txt
The following exception is thrown when an entity exists with a collection containing a parameterized type:
ERROR [AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate): org.hibernate.annotations.common.AssertionFailure: Fail to process type argument in a generic declaration. Type: class sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.getClassFromGenericArgument(AttributeFactory.java:836)
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:748)
at org.hibernate.ejb.metamodel.AttributeFactory$PluralAttributeMetadataImpl.<init>(AttributeFactory.java:723)
at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:518)
at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93)
at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183)
at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:83)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:883)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:47)
at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:316)
For example if a field exists like:
@OneToMany
List<SomeEntity<SomeClass>> associatedList;
I've attached a patch that includes a test case for the entity-manager project and a proposed fix.
--
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
14 years, 7 months
[Hibernate-JIRA] Created: (HHH-5062) In the Session.flush method has a lost of perfomance about 50% when flush a large amout of data
by Fabiano Cury (JIRA)
In the Session.flush method has a lost of perfomance about 50% when flush a large amout of data
-----------------------------------------------------------------------------------------------
Key: HHH-5062
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5062
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.5.0-Final, 3.5.0-CR-2, 3.5.0-CR-1, 3.5.0-Beta-4, 3.5.0-Beta-3, 3.5.0-Beta-2, 3.5.0.Beta-1, 3.3.2, 3.3.1, 3.3.0.SP1, 3.3.0.GA, 3.3.0.CR2, 3.3.0.CR1, 3.2.7, 3.2.6
Environment: Linux / DB2 / version 3.2.6 and above
Reporter: Fabiano Cury
Attachments: issueHibernate.JPG
When the flush method is called this method call the onFlush method of class DefaultFlushEventListener and then the method flushEverythingToExecutions(event).
This method (flushEverythingToExecutions) call many times (loop) the method log.isDebugEnabled().
This cause a big overhead in this method.
I suggest you to put an attribute in the method flushEverythingToExecutions(flushEverythingToExecutions(FlushEvent event, Boolean isDebugEnable) and verify this attribute before the loop for.
Attached the print screen of profiling that help me to detect this issue.
Tks.
--
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
14 years, 7 months