[jboss-user] [JBoss Cache: Core Edition] - skipping re-query for null left outer join object from query

kylesands do-not-reply at jboss.com
Mon Mar 2 10:59:01 EST 2009


Hi...  I'm guessing this is just the way it is, but i'd like to confirm...  I set up query caching for a few Named Queries and it seems to work good.. One exception case though is on a query like this...

  |             select x
  |             from OBJECT_X x 
  |             join fetch x.object_a a
  |             left outer join fetch x.object_b b 
  |             left outer join fetch x.object_c c  
  |             left outer join fetch x.object_d d
  |             where x.id = :id_parm
  | 

In some cases for example, if id_parm = 5, with the outer joins, Object_B and Object_C might be null, which is fine, so the other objects from the query get cached and Object_B and Object_C are not cached, so when the query is called again later, it knows B and C can't be pulled from the cache, so it fires new queries to try and get them from the database even though they will be null.  Can i avoid the re-querying for B and C by a new config setting, or a change in the query perhaps, or would i need to code up a custom cache provider class by chance?

Thanks...
Kyle




View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214230#4214230

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214230



More information about the jboss-user mailing list