[Hibernate-JIRA] Created: (HHH-7222) Hibernate creates aliases for HQL while submitting query to Oracle
by Yogesh A Sakurikar (JIRA)
Hibernate creates aliases for HQL while submitting query to Oracle
------------------------------------------------------------------
Key: HHH-7222
URL: https://hibernate.onjira.com/browse/HHH-7222
Project: Hibernate ORM
Issue Type: Bug
Components: query-hql
Affects Versions: 3.0.5
Environment: JBoss 5.1.0GA, Oracle 10g and 11g, Oracle jdbc driver 10.2
Reporter: Yogesh A Sakurikar
Whenever we run HQL like shown below:
String query = "from xtable a, ytable b where a.xId = :xIdNum and a.xAcc = :xAccId and b.yAcc = a.xAcc and b.yKey = a.xKey "
The oracle creates each invocation of this query as new and executes it. As per the Oracle logs the number of parsing happened for this type of query is equal to the number of executions, which clearly suggest that every execution of the query has been treated as separate.
After we went into more details, we found out that the issue is related to the aliases being passed are different. Oracle was treating the query different as the aliases were different in each run.
Further more after going through lot of online reading, we found not much help, hence raising as an issue.
Kindly suggest us how we can avoid this as we are facing lot of production issues due to this.
Is there any way we can configure hibernate not to create new aliases for the same query?
Thanks in advance
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[Hibernate-JIRA] Created: (HSEARCH-1065) Fuzzy search on Enums crash
by Sylvain Vieujot (JIRA)
Fuzzy search on Enums crash
---------------------------
Key: HSEARCH-1065
URL: https://hibernate.onjira.com/browse/HSEARCH-1065
Project: Hibernate Search
Issue Type: Bug
Components: query
Affects Versions: 4.1.0.CR2
Reporter: Sylvain Vieujot
Attachments: com.seanergie.persistence.HibernateSearchTest.txt, HibernateSearchTest.java
I get doing a fuzzy search on an Enum :
query = ftem.getSearchFactory()
.buildQueryBuilder()
.forEntity( TestEntity.class )
.get()
.keyword()
.fuzzy()
.onField( "testEnum" ) // CRASH HERE
.matching( "TWO" )
.createQuery();
I get the following Exception :
org.hibernate.search.bridge.BridgeException: Exception while calling bridge#objectToString
class: com.seanergie.persistence.HibernateSearchTest$TestEntity
path: testEnum
at org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper.buildBridgeException(ContextualExceptionBridgeHelper.java:97)
at org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper$TwoWayConversionContextImpl.objectToString(ContextualExceptionBridgeHelper.java:149)
at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:370)
at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.objectToString(DocumentBuilderIndexedEntity.java:740)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.buildSearchTerm(ConnectedMultiFieldsTermQueryBuilder.java:141)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:95)
at org.hibernate.search.query.dsl.impl.ConnectedMultiFieldsTermQueryBuilder.createQuery(ConnectedMultiFieldsTermQueryBuilder.java:76)
at com.seanergie.persistence.HibernateSearchTest.testFuzzySearchOnEnum(HibernateSearchTest.java:53)
Code and full stack attached.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[Hibernate-JIRA] Created: (HHH-6915) Restrictions.ilike(String propertyValue, Object value) does not correctly initialize LikeExpresison
by Martin Kartumovich (JIRA)
Restrictions.ilike(String propertyValue, Object value) does not correctly initialize LikeExpresison
---------------------------------------------------------------------------------------------------
Key: HHH-6915
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6915
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 4.0.0.Final
Reporter: Martin Kartumovich
Priority: Minor
The method Restrictions.ilike(String propertyValue, Object value) uses the LikeExpression-Constructor LikeExpression(propertyName, value.toString()) which will initialize the LikeExpression with "ignoreCase = false".
The resulting SQL shows a normal "xyz like ?" instead of the expected "lower(xyz) like lower(?)" (i.e. Oracle10gDialect).
This issue seems to have been introduced with HHH-4943.
Workaround: Use Restrictions.ilike(String propertyValue, Object value, MatchMode mode). This will correctly initialize LikeExpression with "ignoreCase = true".
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months