-->
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: Can you append a restriction to a query dynamically?
PostPosted: Mon Jul 02, 2007 4:55 am 
Newbie

Joined: Tue Aug 01, 2006 4:17 am
Posts: 8
Hibernate version: 3.2.0

Hi Guys

Is it possible to configure an interceptor ( or something similar ) to append a where clause to all dynamically generated queries? I have a flag in every table which I need to add to the clause, but I don't want it to live in the object model at all.

ie when calling the load method hibernate generates a query to load the data from the DB, and I wan't to dynamically append "and recordset = 1" to the sql before it is executed.

Is this possable in the current API

thanks

Mark


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.