-->
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: Limiting Many-to-one records
PostPosted: Sun Jul 23, 2017 1:29 pm 
Newbie

Joined: Sun Jul 23, 2017 1:23 pm
Posts: 1
Hi All,

I have assosication like this:

Code:
<calss name="com.Version">
<many-to-one name="srcID" class="version" fetch="select" not-found="ignore">
            <column name="tid" scale="0" />
  </many-to-one>

<filter name="createDate"  condition="CreateDate &gt; add_months( trunc(sysdate), -12*1 )"/>
</class>


when fetching "Version" Object, the association is fetching lot of data and results in StackOverflow. I tried to put the filter to limit the number of records to recent one year. I have enabled filter,

- not sure if this is correct ot filter is firing or not.

How can I solve this problem ?. Any help is really appreciated


Top
 Profile  
 
 Post subject: Re: Limiting Many-to-one records
PostPosted: Mon Jul 24, 2017 1:03 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1638
Location: Romania
You need to add the data access logic you are using for fetching the Version objects as well as the executed SQL queries because it's not clear what you are doing.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


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.