-->
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.  [ 2 posts ] 
Author Message
 Post subject: Getting Creteria SQL
PostPosted: Tue Nov 14, 2006 5:07 am 
Newbie

Joined: Tue Jan 17, 2006 5:00 am
Posts: 16
I was wondering if it's possible to get the SQL that a Creteria would generate when executed?

I have some DAO objects where it's possible to set up some criteria filters and get the list of objects that meets those criteria's, but in some senarios I would like to just obtain the SQL that those criteria would have generated in order to use this as a subselect in another custum SQL. I just can't seem to find a way to get hold of the SQL that would be generated.

So the question basically is, am I missing something or is this just not possible?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 26, 2006 2:24 am 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
I looked into doing this in order to take advantage of the SQL Cache invalidation in ASP.NET 2.0. You could go in and create and event that gets fired after the sql is constructed and pass it thru the event args, bubbling up to the handler for your other method. I think it is in one of the Loader classes but cant remember for sure.

_________________
If this helped...please remember to rate it!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.