Grant Ronald's Blog

What Select statement did my ADF application send to the database

A question came up on our internal mail lists asking whether a view object might "trim" its select statement if some of the attributes we never used; e.g. they weren't bound to a page.

I wanted to test this out so a simple trick to ensure you can see the select statement that is being sent to the database is the following.  For the ViewController project, right click and Select Project Properties and then Run/Debug/Profile.  In the resulting dialog set Java Options to -Djbo.debugoutput=console

This will ensure that the SELECT statement (and alot more besides) will be sent to the log console window in JDeveloper, as show below.

This is a really valuable tip for tracing out what the framework is doing when you perform specific actions in your application

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.