-->
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: Getting cartesian product from >=3.5.0 of hibernate-core
PostPosted: Sun Oct 17, 2010 9:19 am 
Newbie

Joined: Sun Oct 17, 2010 7:54 am
Posts: 5
Hi everyone,
I try to execute different queries on the hibernate-tutorial example (about Events and Persons).

I tried to execute the query "from Event, Person" with the 3.3.2.GA version of the hibernate-core - all right (Actually I get a cartesian product of two sets (all events and peoples)). So the text of the query is:

Code:
    select
        event0_.EVENT_ID as EVENT1_0_0_,
        person1_.PERSON_ID as PERSON1_1_1_,
        event0_.EVENT_DATE as EVENT2_0_0_,
        event0_.title as title0_0_,
        person1_.age as age1_1_,
        person1_.firstname as firstname1_1_,
        person1_.lastname as lastname1_1_
    from
        EVENTS event0_,
        PERSON person1_



Then I changed the version of the hibernate-core to 3.5.0-Final or 3.6.0.Final in pom.xml and i got the query:
Code:
    select
        event0_.EVENT_ID as EVENT1_0_0_,
        person1_.PERSON_ID as PERSON1_1_1_,
        event0_.EVENT_DATE as EVENT2_0_0_,
        event0_.title as title0_0_,
        person1_.age as age1_1_,
        person1_.firstname as firstname1_1_,
        person1_.lastname as lastname1_1_
    from
        EVENTS event0_ cross
    join
        PERSON person1_


and ... unfortunately the error:
Code:
1878 [org.hibernate.tutorial.EventManager.main()] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: -28, SQLState: S0022
1878 [org.hibernate.tutorial.EventManager.main()] ERROR org.hibernate.util.JDBCExceptionReporter - Column not found: PERSON1_.PERSON_ID in statement ...


What can I do to fix this problem (I want use last version of hibernate-core)?

My pom.xml is:

Code:
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.hibernate.tutorials</groupId>
    <artifactId>hibernate-tutorial</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <name>First Hibernate Tutorial</name>

    <build>
         <!-- we dont want the version to be part of the generated war file name -->
         <finalName>${artifactId}</finalName>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <!--version>3.3.2.GA</version-->
            <version>3.6.0.Final</version>
        </dependency>

        <!-- Hibernate uses slf4j for logging, for our purposes here use the simple backend -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.6.1</version>
        </dependency>

        <!-- Hibernate gives you a choice of bytecode providers between cglib and javassist -->
        <dependency>
            <groupId>javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.8.0.GA</version>
        </dependency>

        <dependency>
            <groupId>hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>1.8.0.7</version>
        </dependency>
    </dependencies>

</project>



May be should I use another version of another libraries (for example hsqldb)?


Top
 Profile  
 
 Post subject: Re: Getting cartesian product from >=3.5.0 of hibernate-core
PostPosted: Mon Nov 29, 2010 5:43 pm 
Pro
Pro

Joined: Mon Apr 16, 2007 8:10 am
Posts: 246
I had the same kind of trouble, also following an upgrade of Hibernate version to 3.6.0.Final

viewtopic.php?f=1&t=1008424


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.