-->
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: Caching a m:n associations with ECahe
PostPosted: Mon Jan 29, 2007 5:27 am 
Beginner
Beginner

Joined: Thu Jan 04, 2007 5:44 am
Posts: 26
Location: Innsbruck - Sivas(TR) - Bregenz
Hi I have Hibernate 3.2 and using java 1.5

How I can chache a n:m (One person have many countries) association with ecache? Is this expedient?

Some facts:

Users can change associations (but rare)
Users can change countries (very rare)


What i must write in:

country.hbm.xml
person.hbm.xml
ehcache.xml
Criteria search..

???

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 29, 2007 5:37 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
You must enable caching for the class and the relations. So there are at least 2 cache tags per class.

Have a look into the documentation.

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 29, 2007 5:41 am 
Beginner
Beginner

Joined: Thu Jan 04, 2007 5:44 am
Posts: 26
Location: Innsbruck - Sivas(TR) - Bregenz
Yes I enable caching for countries in country.hbm.xml and in the relation many-to-many in person. But I have a n:m table PersonCountry this table have no hbm.xml (i implement it like in the documentation).

I only find caching for 1:n oder for standart cahing entity but not for n:m.


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.