[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5325) Minor issues in test suite and suggestions for improvements (fixes HSQDB 2.0 failures)

Fred Toussi (JIRA) noreply at atlassian.com
Thu Jan 13 19:00:05 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39615#action_39615 ] 

Fred Toussi commented on HHH-5325:
----------------------------------

Thanks Gail. Confirming fixed in 3.6.1 RC.

> Minor issues in test suite and suggestions for improvements (fixes HSQDB 2.0 failures)
> --------------------------------------------------------------------------------------
>
>                 Key: HHH-5325
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5325
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: testsuite
>    Affects Versions: 3.5.3
>         Environment: tested with HSQLDB 2.0
>            Reporter: Fred Toussi
>            Assignee: Gail Badner
>            Priority: Minor
>             Fix For: 3.6.1, 4.0.0.Alpha1
>
>
> hql:ASTParserLoadingTest : testComponentNullnessChecks()
> String query = getDialect() instanceof DB2Dialect ?
> "from Human where cast(? as string) is null" :
> "from Human where ? is null"
> The cast should be made by default. DB2 is highly SQL Standard conformant and displays the correct behaviour.
> (SQL Standard Part 3: Call-Level Interface (SQL/CLI)) Others may "invent" a character type for the dynamic param.
> -----------------------
> legacy:FooBarTest : testFindByCriteria()
> if(!(getDialect() instanceof TimesTenDialect)) {
> list = s.createCriteria(Foo.class).setMaxResults(0).list();
> 		assertTrue( list.size()==0 );
> }
> The test produces the equivalent to SQL statements with "FETCH 0 ROWS ONLY" or "LIMIT 0" etc. This is explicitly stated to cause a data exception according to SQL:2008. The row count must be at least 1.
> -----------------------
> org.hibernate.test.hql : Animal.hbm.xml
> This snippet is used in several tests. Search for "centimeters".
> <property name="heightInches">
>  <column name="height_centimeters" not-null="true" 
>  read="height_centimeters / 2.54" 
>  write="? * 2.54"/>
> </property>   
> The target SQL column type is created as DOUBLE in most dialects. The dynamic variable in "? * 2.54" first resolves to DECIMAL because the "declared type" of the numeric literal is DECIMAL. It would be better to use "? * 2.54E0" as a hint to use DOUBLE.

-- 
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list