-->
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: Cache key override
PostPosted: Tue Mar 25, 2008 1:28 pm 
Beginner
Beginner

Joined: Thu Jun 29, 2006 12:32 pm
Posts: 22
Update:
I've answered my own question, which is no...

Not sure of my options yet.. The likely is to provide a mechanism for disabling the field level security implemented by the OLE DB provider, but I wanted to avoid this if possible...

Hibernate version: 1.2.1 GA

Is it possible to override the key used for caching an entity in the 2nd level cache?

We have a situation where the data returned from the database, depending on the user, will have certain fields null'd for security. This happens via a custom developed OLE DB provider, which we have had in commercial use for a number of years across 1,000's of customers.

Scenario 1, USER B cannot see data they should have access to:
    USER A requests entity 1, which is retrieved from the database.
    USER A does not have access to FIELD 1, so OLE DB provider nulls value
    NHibernate caches this entity to the 2nd level cache.
    USER B requests entity 1, which is retrieved from the 2nd level cache.
    USER B does have access to FIELD 1, but the data is not available.



Cheers,

Stuart

_________________
--
Stuart Carnie


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.