[Hibernate-JIRA] Created: (HHH-2069) Batch updates doesn't work with custom NamingStrategy
by Tomas Andersson (JIRA)
Batch updates doesn't work with custom NamingStrategy
-----------------------------------------------------
Key: HHH-2069
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2069
Project: Hibernate3
Type: Bug
Components: query-hql
Versions: 3.2.0.cr2
Environment: Hibernate Core CR2, Hibernate EntityManager CR1, MS SQL Server 2000, jTDS
Reporter: Tomas Andersson
We're using a custom naming strategy which basically adds a table owner to the configured table name, ie. mbr_member becomse iep.mbr_member. We have been using it for a year now without problem.
But, when we started to use batch updates it failed as it couldn't drop a temporary table created during the batch process
During execution with turned on Sql I only see the line below, there is no line displaying a "select into" statement
Hibernate: insert into #iep.mbr_member select member0_.id_ as id_ from iep.mbr_member member0_ where fk_rol_role=?
The stacktrace starts with the following statement
ALLVARLIG: Invalid object name '#iep.mbr_member'.
2006-aug-31 08:37:39 org.hibernate.hql.ast.exec.AbstractStatementExecutor$2 doWork
VARNING: unable to drop temporary id table after use
java.sql.SQLException: Cannot drop the table '#iep.mbr_member', because it does not exist in the system catalog.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:628)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:525)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:487)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:664)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1120)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1073)
at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:225)
at org.hibernate.hql.ast.exec.AbstractStatementExecutor$2.doWork(AbstractStatementExecutor.java:149)
at org.hibernate.hql.ast.exec.AbstractStatementExecutor.dropTemporaryTableIfNecessary(AbstractStatementExecutor.java:170)
at org.hibernate.hql.ast.exec.MultiTableUpdateExecutor.execute(MultiTableUpdateExecutor.java:170)
at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:391)
at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1134)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:43)
at biz.ist.atlas.domain.role.jpa.JpaRoleDAO.removeReferencesFromMembers(JpaRoleDAO.java:65)
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1501) Derby 10 varchar limit is 32672
by Jeff Schnitzer (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501?page=c... ]
Jeff Schnitzer commented on HHH-1501:
-------------------------------------
A related issue is that if you have something like this:
@Column(length=SOMELENGTH)
byte[] stuff;
Then the DerbyDialect tries to create a "VARCHAR(SOMELENGTH) FOR BIT DATA" column, and SOMELENGTH cannot be particularly large of you get errors.
> Derby 10 varchar limit is 32672
> --------------------------------
>
> Key: HHH-1501
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501
> Project: Hibernate3
> Type: Bug
> Components: core
> Versions: 3.1.2
> Environment: Derby 10
> Reporter: Sergey Vladimirov
> Priority: Trivial
>
>
> Derby 10 varchar limit is 32672.
> One need to change DB2Dialect and DerbyDialect to create clob columns, if size of text > 32k:
> registerColumnType(Types.CHAR, 254, "char(1)");
> registerColumnType(Types.VARCHAR, 32672, "varchar($l)");
> registerColumnType(Types.VARCHAR, Integer.MAX_VALUE, "clob($l)");
> (BTW, char limit is 254).
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1293) java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
by Aapo Romu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=c... ]
Aapo Romu commented on HHH-1293:
--------------------------------
Hopefully there will be compatible annotations release soon too...
--- clip ---
NOTE: The current release of Hibernate Annotations requires Hibernate 3.2.0 CR2. Don't use any other Hibernate Core version!
--- clip ---
That's true.. Tried also other versions...
> java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
> -----------------------------------------------------------------------------
>
> Key: HHH-1293
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.1
> Reporter: Andreas Schildbach
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 3.2.0.cr4
> Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3, hibernate3.jar, manysessions.tgz
>
>
> As documented in
> http://forum.hibernate.org/viewtopic.php?t=940119
> some people (including me) are getting this exception with the final release of Hibernate 3.1:
> java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
> at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
> at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
> at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
> at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
> at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
> at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
> at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
> at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
> at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
> The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often.
--
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
18 years, 3 months
[Hibernate-JIRA] Created: (ANN-437) @IndexColumn does not work with discriminator-inheritance on the target entity of the list
by ron piterman (JIRA)
@IndexColumn does not work with discriminator-inheritance on the target entity of the list
------------------------------------------------------------------------------------------
Key: ANN-437
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-437
Project: Hibernate Annotations
Type: Bug
Versions: 3.2.0.cr1
Reporter: ron piterman
When using inheritance on the target entity of a List, @IndexColumn annotation does not work. Hibernate does not populate the index column value on the target entites. As a result, the sort_order column is null.
(In the code example below a generator for the @ID is missing.)
@Entity
public class PropertyOwner {
@Id
private Long id;
@OneToMany(mappedBy="owner",cascade=CascadeType.ALL)
@IndexColumn(name="sort_order")
private List<AbstractProperty> properties;
...
}
@Entity
@DiscriminatorColumn(name="property_type",discriminatorType=DiscriminatorType.STRING)
public abstract class AbstractProperty {
@Id
private Long id;
@ManyToOne
private PropertyOwner owner;
}
@Entity
@DiscriminatorValue("integer")
public class IntegerProperty extends AbstractProperty {
int integerValue;
...
}
@Entity
@DiscriminatorValue("string")
public class StringProperty extends AbstractProperty {
String stringValue;
...
}
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-465) order by nulls first / last
by sridhar paladugu (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-465?page=co... ]
sridhar paladugu commented on HHH-465:
--------------------------------------
We are working on a large project using Hibernate, and really would like to see this issue fixed.
I do not have problem in using some oracle native functions in order by clause in HQL except "NULLS LAST".
Hibernate while generating oracle sql ignoring th key word (NULLS LAST) and generating the SQL without the keyword present in order by clause.
Following is a sample query i am using
HQL: " select me.name from MyEntity me order by me.name NULLS LAST"
generated SQL: select TBL.NAME FROM MyTable TBL ORDER BY TBL.NAME.
Thanks
Sridhar
> order by nulls first / last
> ---------------------------
>
> Key: HHH-465
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-465
> Project: Hibernate3
> Type: Improvement
> Components: core
> Versions: 3.0.3
> Reporter: Anthony Patricio
> Priority: Minor
>
>
> support of nulls first / last in order clause
> "NULLS LAST" is part of the SQL 99 standard.
> The syntax is as follows:
> ORDER BY [COLUMN NAME] [ASC | DESC] [NULLS FIRST | NULLS LAST]
> In different DBs, the sorting of nulls relative to other values is handled differently.
> PostgreSQL - Nulls are considered HIGHER than non-nulls.
> DB2 - Higher
> MSSQL - Lower
> MySQL - Lower
> Oracle - Higher
> The following DBs have supported this functionality:
> DB2 V7
> Oracle 9i
> PostgreSQL, MySQL, SQLServer do not appear to support this from what I can gather.
> see http://forum.hibernate.org/viewtopic.php?t=942176&start=0&postdays=0&post...
--
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
18 years, 3 months
[Hibernate-JIRA] Commented: (HHH-1293) java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=c... ]
Steve Ebersole commented on HHH-1293:
-------------------------------------
I am currently not planning on doing a 3.1.4 release. 3.2.0.ga will be released early next week.
> java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer()
> -----------------------------------------------------------------------------
>
> Key: HHH-1293
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293
> Project: Hibernate3
> Type: Bug
> Versions: 3.1.1
> Reporter: Andreas Schildbach
> Assignee: Scott Marlow
> Priority: Blocker
> Fix For: 3.2.0.cr4
> Attachments: CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch, CGLIBLazyInitializer.patch3, CGLIBLazyInitializer.patch4, CGLIBProxyFactory.patch3, hibernate3.jar, manysessions.tgz
>
>
> As documented in
> http://forum.hibernate.org/viewtopic.php?t=940119
> some people (including me) are getting this exception with the final release of Hibernate 3.1:
> java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer;
> at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96)
> at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82)
> at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520)
> at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474)
> at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328)
> at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
> at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202)
> at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169)
> at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
> at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
> at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
> at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177)
> at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378)
> at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130)
> at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48)
> at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627)
> at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
> at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
> at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109)
> at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
> The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often.
--
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
18 years, 3 months