-->
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: hibernate strange behaviour? returing same row every time.
PostPosted: Sun Oct 31, 2010 9:50 pm 
Newbie

Joined: Mon Oct 11, 2010 7:44 am
Posts: 4
Hi all,
I have DB View. and using hibernate to retrieve some data from view.

I am sending simple query like

Code:
"from ViewContent where blessUid=1"


And it is returning me only 1 same row * count(*).. e.g. like if there are 35 rows then I am getting first row 35 times... is fine or i am missing something???
and exe. same query (sql logged by hibernate) on mysql returns all fine results.

HBM
Code:
<hibernate-mapping package="com.deamon.model">
<class name="ViewContent" table="view_content" mutable="false">
<cache usage="read-only"/>
        <!--<synchronize table="SnsUser"/>
        <synchronize table="Pariticipant"/>
        <synchronize table="Interaction"/>
        <synchronize table="Content"/>

        --><id name="snsUid" type="java.lang.Integer">
            <column name="sns_uid" />
            <generator class="identity" />
        </id>
        <property name="blessUid" type="java.lang.Integer">
            <column name="bless_uid" />
        </property>...

thank you.


Top
 Profile  
 
 Post subject: Re: hibernate strange behaviour? returing same row every time.
PostPosted: Mon Nov 01, 2010 11:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 11, 2009 2:26 am
Posts: 29
what do you mean of "get the first row 35 times"..
and how you created the view?


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.