[Hibernate-JIRA] Closed: (HHH-1106) HQL "not in" generatad wrong SQL
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1106?page=c... ]
Steve Ebersole closed HHH-1106.
-------------------------------
Closing stale resolved issues
> HQL "not in" generatad wrong SQL
> --------------------------------
>
> Key: HHH-1106
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1106
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: 3.0.5, DB2
> Reporter: Jarle Rudihagen
> Assignee: Gavin King
> Fix For: 3.1 rc3
>
>
> HQL:
> select distinct soknadLinjeDO.soknadDO.soknId from SoknadLinjeDO as soknadLinjeDO
> where soknadLinjeDO.soknStatKode in (<list of code params>)
> and not (soknadLinjeDO.grKombKode in (<list of code params>)
> and soknadLinjeDO.soknadDO.soknGrKode = :PARAM)
> Generates SQL:
> select distinct soknadlinj0_.SOKN_ID as col_0_0_ from T_SOKNAD_LINJE
> soknadlinj0_, T_SOKNAD soknaddo1_ where
> soknadlinj0_.SOKN_ID=soknaddo1_.SOKN_ID
> and (soknadlinj0_.SOKN_STAT_KODE in (?,?,?.....))
> and (soknadlinj0_.GR_KOMB_KODE in (?, ?.....)
> or soknaddo1_.SOKN_GR_KODE<>?)
> Here the problem is that it negates the "not in" clause and forgets to put in the "not in" in the following soknadlinj0_.GR_KOMB_KODE in (?, ?.....). There is one to many relationship between SoknadDO and SoknadLinjeDO.
--
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, 1 month
[Hibernate-JIRA] Closed: (HHH-908) CLONE -NullPointerException when using BigInteger in a query
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-908?page=co... ]
Steve Ebersole closed HHH-908.
------------------------------
Closing stale resolved issues
> CLONE -NullPointerException when using BigInteger in a query
> ------------------------------------------------------------
>
> Key: HHH-908
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-908
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: Hibernate 3.0.5, Oracle 9.2.0.6
> Reporter: Karl Wettin
> Assignee: Gavin King
> Priority: Minor
> Fix For: 3.1 rc 1
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> When I'm using a BigInteger in a query like
> Query query = session.createQuery("from Antrag as antrag where
> antrag.m_kreditId = (:kreditId)");
> query.setBigInteger("kreditId", new BigInteger(kreditId));
> I get the following Exception:
> java.lang.ClassCastException
> at org.hibernate.type.BigDecimalType.set(BigDecimalType.java:28)
> at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:62)
> at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:44)
> at org.hibernate.hql.classic.QueryTranslatorImpl.bindNamedParameters(QueryTranslatorImpl.java:877)
> at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1178)
> at org.hibernate.loader.Loader.doQuery(Loader.java:390)
> at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
> at org.hibernate.loader.Loader.doList(Loader.java:1593)
> at org.hibernate.loader.Loader.list(Loader.java:1577)
> at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:890)
> I believe that this bug be caused by a typo in org.hibernate.hql.ast.ArithmeticNode:
> if ( x==Hibernate.BIG_DECIMAL || y==Hibernate.BIG_DECIMAL ) return Hibernate.BIG_DECIMAL;
> if ( x==Hibernate.BIG_INTEGER || y==Hibernate.BIG_INTEGER ) return Hibernate.BIG_DECIMAL;
> should actually be:
> if ( x==Hibernate.BIG_DECIMAL || y==Hibernate.BIG_DECIMAL ) return Hibernate.BIG_DECIMAL;
> if ( x==Hibernate.BIG_INTEGER || y==Hibernate.BIG_INTEGER ) return Hibernate.BIG_INTEGER;
--
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, 1 month