[Hibernate-JIRA] Created: (HHH-4977) org.hibernate.test.hql.ASTParserLoadingTest error running testOneToManyFilter with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest error running testOneToManyFilter with Ingres
-----------------------------------------------------------------------------------------
Key: HHH-4977
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4977
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Attachments: hql-astparserloadingtest.zip
Error reported executing org.hibernate.test.hql.ASTParserLoadingTest testOneToManyFilter with an Ingres exception
{noformat}
<error message="could not execute query" type="org.hibernate.exception.SQLGrammarException">org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.listFilter(SessionImpl.java:1614)
at org.hibernate.impl.CollectionFilterImpl.list(CollectionFilterImpl.java:74)
at org.hibernate.test.hql.ASTParserLoadingTest.testOneToManyFilter(ASTParserLoadingTest.java:1653)
Caused by: com.ingres.gcf.util.SqlEx: A <column reference> contained a <qualifier> 'order0_'
which did not correspond to any of the <table reference>s
within whose scope the <column reference> appeared.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2254)
... 38 more
</error>
{noformat}
The SQL query that is produced references order0_ in the WHERE clause of the subselect.
{noformat}
select
order0_.customerId as customerId35_,
order0_.orderNumber as orderNum2_35_,
order0_.orderDate as orderDate35_,
( select
sum(li.quantity*p.cost)
from
LineItem li,
Product p
where
li.productId = p.productId
and li.customerId = order0_.customerId
and li.orderNumber = order0_.orderNumber ) as formula1_
from
CustomerOrder order0_
where
order0_.customerId = ?
{noformat}
Once the scoping error is removed a more fundamental error is exposed "Sub-selects are not supported within select target lists."
--
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, 8 months
[Hibernate-JIRA] Created: (HHH-4976) org.hibernate.test.hql.ASTParserLoadingTest error running testImplicitPolymorphism with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest error running testImplicitPolymorphism with Ingres
----------------------------------------------------------------------------------------------
Key: HHH-4976
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4976
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Attachments: hql-astparserloadingtest.zip
Error reported executing org.hibernate.test.hql.ASTParserLoadingTest testImplicitPolymorphism with an Ingres exception
{noformat}
<error message="could not execute query" type="org.hibernate.exception.SQLGrammarException">org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.test.hql.ASTParserLoadingTest.testImplicitPolymorphism(ASTParserLoadingTest.java:1537)
Caused by: com.ingres.gcf.util.SqlEx: A <column reference> contained a <qualifier> 'product0_'
which did not correspond to any of the <table reference>s
within whose scope the <column reference> appeared.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2254)
... 38 more
</error>
{noformat}
The SQL query that is produced references product0_ in the WHERE clause of the subselect.
{noformat}
select
product0_.productId as productId37_,
product0_.description as descript2_37_,
product0_.cost as cost37_,
product0_.numberAvailable as numberAv4_37_,
( select
sum(li.quantity)
from
LineItem li
where
li.productId = product0_.productId ) as formula2_
from
Product product0_
{noformat}
Once the scoping error is removed a more fundamental error is exposed "Sub-selects are not supported within select target lists."
--
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, 8 months
[Hibernate-JIRA] Created: (HHH-4973) org.hibernate.test.hql.ASTParserLoadingTest error running testSelectClauseSubselect with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest error running testSelectClauseSubselect with Ingres
-----------------------------------------------------------------------------------------------
Key: HHH-4973
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4973
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Attachments: hql-astparserloadingtest.zip
Error executing testSelectClauseSubselect in org.hibernate.test.hql.ASTParserLoadingTest with an Ingres exception
{noformat}
<error message="could not execute query" type="org.hibernate.exception.SQLGrammarException">org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.test.hql.ASTParserLoadingTest.testSelectClauseSubselect(ASTParserLoadingTest.java:1057)
Caused by: com.ingres.gcf.util.SqlEx: A <column reference> contained a <qualifier> 'animal0_'
which did not correspond to any of the <table reference>s
within whose scope the <column reference> appeared.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2254)
... 38 more
</error>
{noformat}
The SQL query that is produced references animal0_ in the WHERE clause of the sub-select.
{noformat}
select
(select
max(zoo1_.id)
from
Zoo zoo1_
where
animal0_.zoo_id=zoo1_.id) as col_0_0_
from
Animal animal0_
{noformat}
Once the scoping error is removed a more fundamental error is exposed "Sub-selects are not supported within select target lists."
--
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, 8 months
[Hibernate-JIRA] Created: (HHH-4970) org.hibernate.test.hql.ASTParserLoadingTest error running testComponentParameterBinding with Ingres
by Ray Fan (JIRA)
org.hibernate.test.hql.ASTParserLoadingTest error running testComponentParameterBinding with Ingres
---------------------------------------------------------------------------------------------------
Key: HHH-4970
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4970
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Ingres 9.3.1 (int.lnx/106), Ingres9Dialect
Reporter: Ray Fan
Attachments: hql-astparserloadingtest.zip
org.hibernate.test.hql.ASTParserLoadingTest testComponentParameterBinding reports an error executing the test with an Ingres exception.
{noformat}
<error message="could not execute query" type="org.hibernate.exception.SQLGrammarException">org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2257)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2151)
at org.hibernate.loader.Loader.list(Loader.java:2146)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:448)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1258)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.test.hql.ASTParserLoadingTest.testComponentParameterBinding(ASTParserLoadingTest.java:645)
Caused by: com.ingres.gcf.util.SqlEx: A <column reference> contained a <qualifier> 'order0_'
which did not correspond to any of the <table reference>s
within whose scope the <column reference> appeared.
at com.ingres.gcf.jdbc.DrvObj.readError(Unknown Source)
at com.ingres.gcf.jdbc.DrvObj.readResults(Unknown Source)
at com.ingres.gcf.jdbc.DrvPrep.prepare(Unknown Source)
at com.ingres.gcf.jdbc.DrvConn.createPrepStmt(Unknown Source)
at com.ingres.gcf.jdbc.JdbcPrep.<init>(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.createPrep(Unknown Source)
at com.ingres.gcf.jdbc.JdbcConn.prepareStatement(Unknown Source)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1597)
at org.hibernate.loader.Loader.doQuery(Loader.java:718)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:271)
at org.hibernate.loader.Loader.doList(Loader.java:2254)
... 38 more
</error>
{noformat}
The SQL query that is produced references order0_ in the WHERE clause of the sub-select query
{noformat}
select
order0_.customerId as customerId35_,
order0_.orderNumber as orderNum2_35_,
order0_.orderDate as orderDate35_,
( select
sum(li.quantity*p.cost)
from
LineItem li,
Product p
where
li.productId = p.productId
and li.customerId = order0_.customerId
and li.orderNumber = order0_.orderNumber ) as formula1_
from
CustomerOrder order0_ cross
join
Customer customer1_
where
order0_.customerId=customer1_.customerId
and customer1_.name=?
and order0_.customerId=?
and order0_.orderNumber=?
{noformat}
Once the scoping error is removed a more fundamental error is exposed "Subselects are not supported within select target lists."
--
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, 8 months
[Hibernate-JIRA] Created: (HHH-4026) one-to-one non-lazy loading but Filters Not Applied.
by Sandeep Vaid (JIRA)
one-to-one non-lazy loading but Filters Not Applied.
----------------------------------------------------
Key: HHH-4026
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4026
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 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: Hibernate 3.2.6
Reporter: Sandeep Vaid
Attachments: EntityJoinWalker.java
While fetching one-to-one association, filters are not applied.
I have modified the hibernate code to resolve this issue. With these changes, if filters a are enabled for one-to-one associations,
they will be applied (appear in sql) else not.
Changes Done:
A) In EntityJoinWalker.java >> constructor:line 40
Current Code:
StringBuffer whereCondition = whereString( getAlias(), uniqueKey, batchSize )
//include the discriminator and class-level where, but not filters
.append( persister.filterFragment( getAlias(), Collections.EMPTY_MAP ) );
Changed Code:
StringBuffer whereCondition = whereString( getAlias(), uniqueKey, batchSize );
//include the discriminator and class-level where, but not filters
String filter= persister.filterFragment( getAlias(), enabledFilters);
whereCondition.insert( 0, StringHelper.moveAndToBeginning(filter) );
--
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, 8 months