-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate Internationalization second level cache
PostPosted: Fri Aug 22, 2008 11:42 am 
Newbie

Joined: Fri Aug 22, 2008 11:07 am
Posts: 6
Location: Italy
Hi,
i'm going to implement a internationalized data in Hibernate as describe on

http://blog.hibernate.org/1592.lace by Gavin King.

No problem for implementation, but I got problem on second level cache when an internationalized object is cached.
Here is an example:
Code:
<class name="TipoProdottoImpl" proxy="TipoProdotto"   table="tipo_prodotto">      
      <cache usage="read-only"/>
      <id name="id" type="long" column="id">
         <generator class="sequence">
            <param name="sequence">HIB_OBJ_SEQUENCE</param>
         </generator>
      </id>
      <property name="codice" column="codice" type="string" />
      <property name="descrizione" column="descrizione" type="LabelUserType" />
</class>


Now when i retrieve the first time tipo_prodotto it's cached by Hibernate in a second level cache ehcache with the first user language.
When i get it the second time with another language i get the first element with the first language.

What can i do? any solution?
I need secon level cache....

thank's
Claudio


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.