Lionel wrote: > Etienne Bernard wrote: >> Hi Alan, >> >> Personnaly I would use hibernate filters to automatically add the >> where >> clause. > > Filters work fine for criterias and queries, but they are not applied > on a session.get or session.load... > You still have to check the customerId manually
You can try to implement org.hibernate.classic.LifeCycle and check the customerId in doLoad. Throw an exception if it does not match. I don't now if it's the best approach, but it's easy to code and it seems to work. doLoad seems to be called before any action (load/insert/update/delete). ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
