[Hibernate-JIRA] Created: (HHH-1985) NodeTraverser is not SOE-safe
by Sergey Vladimirov (JIRA)
NodeTraverser is not SOE-safe
-----------------------------
Key: HHH-1985
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1985
Project: Hibernate3
Type: Improvement
Components: core
Versions: 3.2.0.cr3
Reporter: Sergey Vladimirov
Priority: Minor
org.hibernate.hql.ast.util.NodeTraverser
It is possible for java.lang.StackOverflowError to occur in NodeTraverser.java:41;42 with very deep tree. Need another algorith to visit whole tree.
08.08 19:50:09 ERROR [ArpSiteServlet] Servlet.service() for servlet ArpSiteServlet threw exception
java.lang.StackOverflowError
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:41)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
at org.hibernate.hql.ast.util.NodeTraverser.visitDepthFirst(NodeTraverser.java:42)
--
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, 10 months
[Hibernate-JIRA] Created: (HHH-2094) Hibernate is ignoring native sql aliases and generating "column not found" error
by Leonardo Penczek (JIRA)
Hibernate is ignoring native sql aliases and generating "column not found" error
--------------------------------------------------------------------------------
Key: HHH-2094
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2094
Project: Hibernate3
Type: Bug
Components: query-sql
Versions: 3.2.0.cr4
Environment: 3.2.0.cr4, Adaptive Server Enterprise/12.5.3
Reporter: Leonardo Penczek
Priority: Critical
As simples as that:
1: Query q = em.createNativeQuery("select cd_person as codePerson, cd_person as identif from PERSON");
2: List<Object[]> resultList = (List<Object[]>) q.getResultList();
Hibernate is ignoring my aliases when retrieving information from the ResultSet because it is trying to retrieve by column name, generating the following error:
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:641)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
at <my line 2 in the code above>
...
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2147)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
at org.hibernate.loader.Loader.list(Loader.java:2023)
at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:150)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
...
Caused by: java.sql.SQLException: S0022: Invalid column name 'cd_person'.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(Unknown Source)
at com.sybase.jdbc3.tds.TdsResultSet.findColumnByLabel(Unknown Source)
at com.sybase.jdbc3.jdbc.SybResultSet.findColumn(Unknown Source)
at com.sybase.jdbc3.jdbc.SybResultSet.getInt(Unknown Source)
at org.jboss.resource.adapter.jdbc.WrappedResultSet.getInt(WrappedResultSet.java:690)
at org.hibernate.type.IntegerType.get(IntegerType.java:28)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:113)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:139)
at org.hibernate.loader.custom.CustomLoader$ScalarResultColumnProcessor.extract(CustomLoader.java:474)
at org.hibernate.loader.custom.CustomLoader$ResultRowProcessor.buildResultRow(CustomLoader.java:420)
at org.hibernate.loader.custom.CustomLoader.getResultColumnOrRow(CustomLoader.java:317)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:594)
at org.hibernate.loader.Loader.doQuery(Loader.java:689)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2144)
Awesome! The SQL query runs, but the Hibernate try to get the column by the original name, not by the alias, causing the error!
It is not possible to correctly get the value of 2 different columns that have the same name!!!!
Hint: why Hibernate use ResultSet.get* by column name instead of positional ResultSet.get* (1, 2, 3,...)? It will solve this problem.
--
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, 11 months
[Hibernate-JIRA] Créée: (HHH-2086) Patch for bug HHH-2076 and to be able to use <formula> in <key> for <one-to-many>
by Xavier Brénuchon (JIRA)
Patch for bug HHH-2076 and to be able to use <formula> in <key> for <one-to-many>
---------------------------------------------------------------------------------
Key: HHH-2086
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2086
Project: Hibernate3
Type: Patch
Components: core
Versions: 3.2.0.cr4
Reporter: Xavier Brénuchon
Attachments: formula_one_to_many.patch
Hello,
There is a patch to correct bug HHH-2076 and make an improvement for HHH-944.
In fact, theses 2 cases are linked. They need, amongst other things, a formula in the right part of outer join.
This patch is simple but many class concerns (to propagate formula templates).
About formula in one-to-many :
You must have at least a column (not only formula), because it's not possible to have an Update order without at least a column. If it is the case, hibernate patch will raise an MappingException rightly.
This patch add two TestCase :
org.hibernate.test.onetoone.bidirectionnalformula. OneToOneBidirectionalFormulaTest
org.hibernate.test.onetomany.formula. OneToManyFormulaTest
Would it be possible to integrate this patch into Hibernate 3.2 ?
--
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
15 years, 5 months
[Hibernate-JIRA] Créée: (HHH-2060) To be able to use <generator> with <composite-id>
by Xavier Brénuchon (JIRA)
To be able to use <generator> with <composite-id>
-------------------------------------------------
Key: HHH-2060
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2060
Project: Hibernate3
Type: Improvement
Versions: 3.2.0.cr4
Environment: Hibernate 3.x
Reporter: Xavier Brénuchon
Hello,
This is the continuation of HB-389
We develop an application which has very strong need for performance with several tens of million recordings. Partitioning is a need.
So for that, I use <composite-id>. But my primary key is not a natural key, but a real technical key :
- column of partitioning for optimization of the data base
- column of technical id
So I need to have a generator, for exemple :
<composite-id name="id" class="IdPartition">
<key-property name="org" type="string" column="ORG"/>
<key-property name="id" type="long" column="ID"/>
<generator class="fr.test.xavier.IdPartitionGenerator">
<param name="table">TAB_SEQ</param>
<param name="column">LAST</param>
</generator>
</composite-id>
The good news is that Hibernate can use that (HB-389).
In fact, it is enough to modify the DTD to authorize <generator> in <composite-id> and it is all. The current code of Hibernate manages it very well.
Is it possible that Hibernate is enriched by this functionality?
--
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
15 years, 8 months
[Hibernate-JIRA] Created: (HBX-757) Add output file name, delimiter, halt on error, and format options to SchemaUpdate/<hbm2ddl>
by Dan Ports (JIRA)
Add output file name, delimiter, halt on error, and format options to SchemaUpdate/<hbm2ddl>
--------------------------------------------------------------------------------------------
Key: HBX-757
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-757
Project: Hibernate Tools
Type: Improvement
Components: ant
Versions: 3.2beta7
Reporter: Dan Ports
Priority: Minor
The file name, delimiter, halt on error, and format options are provided by SchemaExport/<hbm2ddl> already, so it makes sense to add their functionality to SchemaUpdate as well. I'll submit a patch shortly. (Is this the right place to post this, since SchemaUpdate is in the Hibernate core SVN?)
--
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
15 years, 10 months
[Hibernate-JIRA] Created: (HHH-2077) Providing an escape sequence for Criteria queries
by Tobias Dietl (JIRA)
Providing an escape sequence for Criteria queries
-------------------------------------------------
Key: HHH-2077
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2077
Project: Hibernate3
Type: Improvement
Components: query-criteria
Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2, 3.2.0.cr3, 3.2.0.cr4
Environment: Hibernate 3.1.3, MySQL, HSQLDB, Oracle
Reporter: Tobias Dietl
Up to now, there is no way of setting the escape sequence to use for string comparisions with like for Criteria queries.
This is necessary as MySQL on the one hand and HSQLDB / Oracle on the other behave differently...
If you want to search for '_abc' in MySQL, you have to use:
value like '\\_abc'
In Oracle or HsqlDB, you have to use:
value like '\_abc'
If you want to switch to another escape sequence like '|' , you can set it in HQL with value like '|_abc' escape '|'. Unfortunately, there is no way of setting it for Criteria queries, which would force me to rewrite all my Criteria queries in HQL. It would really be nice if the feature/improvement would be added...
--
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
15 years, 11 months