-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Error in automatically generated SQL-Query. Postgres-dialect
PostPosted: Mon Aug 28, 2006 7:01 am 
Newbie

Joined: Mon Aug 28, 2006 6:31 am
Posts: 16
Hibernate version: 3.2cr1


Full stack trace of any exception that occurs: ERROR: syntax error at or near "select" at character 283

Name and version of the database you are using: Postgresql 8.1.4

The generated SQL (show_sql=true):
Code:
select
        this_.id as id13_3_,
        this_1_.DESC_ID as DESC2_13_3_,
        this_.token as token16_3_,
        descriptio2_.DESC_ID as DESC1_2_0_,
        value3_.lookup_id as lookup1_5_,
        lookupvalu4_.id as lookupva2_5_,
       select
            a9.valkey
        from
            LOOKUP_VAL as a9
        where
            a9.id=value3_.lookupvalue_id as formula0_5_




Hello,
i've got a problem. The following automatically generated Query
Code:
select
        this_.id as id13_3_,
        this_1_.DESC_ID as DESC2_13_3_,
        this_.token as token16_3_,
        descriptio2_.DESC_ID as DESC1_2_0_,
        value3_.lookup_id as lookup1_5_,
        lookupvalu4_.id as lookupva2_5_,
       select
            a9.valkey
        from
            LOOKUP_VAL as a9
        where
            a9.id=value3_.lookupvalue_id as formula0_5_


couldn't be executed correctly because of missing of '('-brackets. If i put the brackets manually:
Code:
select
        this_.id as id13_3_,
        this_1_.DESC_ID as DESC2_13_3_,
        this_.token as token16_3_,
        descriptio2_.DESC_ID as DESC1_2_0_,
        value3_.lookup_id as lookup1_5_,
        lookupvalu4_.id as lookupva2_5_,
( select
            a9.valkey
        from
            LOOKUP_VAL as a9
        where
            a9.id=value3_.lookupvalue_id
) as formula0_5_


postgres executes the query properly .

Please help with a hint or patch.

Thanks and sorry for my english ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 29, 2006 5:38 pm 
Newbie

Joined: Mon Aug 28, 2006 6:31 am
Posts: 16
There is no more problem with this query, since i've been using self compiled Hibernate Annotations 3.2.0.CR2 and Hibernate 3.2 cr3 from SVN-Repos.

Thanks, Gena


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.