You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Vlasov Igor (JIRA)" <ji...@apache.org> on 2012/09/20 14:34:07 UTC

[jira] [Commented] (DERBY-5933) SQL sorting error

    [ https://issues.apache.org/jira/browse/DERBY-5933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459559#comment-13459559 ] 

Vlasov Igor commented on DERBY-5933:
------------------------------------

The query is 

    select
        projecttas0_.t_id as t1_4_0_,
        project1_.p_id as p1_3_1_,
        morefld2_.mf_id as mf1_2_2_,
        user3_.usr_id as usr1_9_3_,
        morefld4_.mf_id as mf1_2_4_,
        projecttas0_.t_content as t2_4_0_,
        projecttas0_.t_deadline as t3_4_0_,
        projecttas0_.t_hours as t4_4_0_,
        projecttas0_.mf_level as mf9_4_0_,
        projecttas0_.sys_usr as sys10_4_0_,
        projecttas0_.sys_cre as sys5_4_0_,
        projecttas0_.sys_end as sys6_4_0_,
        projecttas0_.sys_upd as sys7_4_0_,
        projecttas0_.owner_id as owner11_4_0_,
        projecttas0_.p_id as p12_4_0_,
        projecttas0_.t_start as t8_4_0_,
        projecttas0_.mf_status as mf13_4_0_,
        projecttas0_.worker_id as worker14_4_0_,
        project1_.mf_level as mf7_3_1_,
        project1_.p_name as p2_3_1_,
        project1_.sys_usr as sys8_3_1_,
        project1_.sys_cre as sys3_3_1_,
        project1_.sys_end as sys4_3_1_,
        project1_.sys_upd as sys5_3_1_,
        project1_.p_start as p6_3_1_,
        morefld2_.dm_id as dm8_2_2_,
        morefld2_.mf_key as mf2_2_2_,
        morefld2_.mf_name as mf3_2_2_,
        morefld2_.sys_usr as sys9_2_2_,
        morefld2_.sys_cre as sys4_2_2_,
        morefld2_.sys_end as sys5_2_2_,
        morefld2_.sys_upd as sys6_2_2_,
        morefld2_.mf_order as mf7_2_2_,
        user3_.usr_blocked as usr2_9_3_,
        user3_.usr_email as usr3_9_3_,
        user3_.usr_fio as usr4_9_3_,
        user3_.if_user as if5_9_3_,
        user3_.last_login as last6_9_3_,
        user3_.usr_login as usr7_9_3_,
        user3_.sys_usr as sys14_9_3_,
        user3_.sys_cre as sys8_9_3_,
        user3_.sys_end as sys9_9_3_,
        user3_.sys_upd as sys10_9_3_,
        user3_.usr_password as usr11_9_3_,
        user3_.usr_rme_code as usr12_9_3_,
        user3_.usr_emailsend as usr13_9_3_,
        user3_.usr_type as usr15_9_3_,
        morefld4_.dm_id as dm8_2_4_,
        morefld4_.mf_key as mf2_2_4_,
        morefld4_.mf_name as mf3_2_4_,
        morefld4_.sys_usr as sys9_2_4_,
        morefld4_.sys_cre as sys4_2_4_,
        morefld4_.sys_end as sys5_2_4_,
        morefld4_.sys_upd as sys6_2_4_,
        morefld4_.mf_order as mf7_2_4_ 
    from
        project_task projecttas0_ 
    inner join
        project project1_ 
            on projecttas0_.p_id=project1_.p_id 
    inner join
        morefld morefld2_ 
            on projecttas0_.mf_status=morefld2_.mf_id 
    left outer join
        user_ user3_ 
            on projecttas0_.worker_id=user3_.usr_id 
    inner join
        morefld morefld4_ 
            on projecttas0_.mf_level=morefld4_.mf_id 
    where
        1=1 
        and (
            projecttas0_.sys_end is null
        ) 
        and (
            morefld2_.mf_id in (
                5
            )
        ) 
    order by
        projecttas0_.t_id desc fetch first 30 rows only

                
> SQL sorting error
> -----------------
>
>                 Key: DERBY-5933
>                 URL: https://issues.apache.org/jira/browse/DERBY-5933
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.9.1.0
>         Environment: Windows 7 Netbeans JDBC GUI
>            Reporter: Vlasov Igor
>
> Hello 
> I have a simple database with 100 records.
> I am running a SQL query from Netbeans GUI though JDBC
> This query was generated by Hibernate ORM.
> In certain circumstances the result rowset is not sorting.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira