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: Second Level Cache and complex properties
PostPosted: Thu Nov 19, 2009 8:46 am 
Newbie

Joined: Thu Nov 19, 2009 8:30 am
Posts: 1
The following config is in my code that runs in production.
I would like to use Second Level Cache on entity B and I generally run a query on entity A.
My problem is, that B entities are not in the the cache, and Hibernate always runs a second select, that queries B from the database.

It is possible to force Hibernate to use the cache?

A -- M2O --> B

<class name="A" table="A">
<many-to-one name="nameOfTheField" property-ref="complexProps">
<column name="stringCodeOfB" />
<formula>1</formula>
</many-to-one>
</class>

<class name="B" table="B">
<properties name="complexProps">
<property name="stringCode" column="stringCode" />
<property name="status" column="status" />
</properties>
</class>


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.