-->
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.  [ 3 posts ] 
Author Message
 Post subject: Second level cache not in effect?
PostPosted: Thu May 29, 2008 6:48 am 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
We have several complex object graphs. In a lot of cases, we relate 1:1 and 1:M objects using property-ref's.

Alas, this causes Hibernate to not use the second level cache, causing horrible performance (tons of SQL statements are generated).

Various fetch-depth strategies have been tried, but increasing this to much have other negative performance effects :-(

Any way to make property-ref relations cached? I'm willing to write a second level cache provider if someone could outline what it would take ot get propery-ref's cached.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 29, 2008 6:58 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
I'm just curious, what do you mean with
Quote:
property-ref

?

did you try this on the property? :
http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#d0e2867

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 29, 2008 7:09 am 
Senior
Senior

Joined: Tue Oct 21, 2003 8:15 am
Posts: 186
property-ref means relations using non-primary key field.

And no, I don't use annotations. I did however mark the field as cached in the mapping file. And that works for relations on primary keys, but not on property-ref mappings.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.