Jump to content
  • Testing/Debug DQL of Global Data


    Sucheta S

    A nice way to test/debug your DQL and criteria objects

    TIBCO Business Studio Script

    log String(scorecardCriteria) just before do the search.

     var DQLString = "projectContext=:projectContext and parentType=:parentType and  parentId=:parentId and milestone=:milestone";  var scorecardCriteria = cac_com_example_msscorecard_data_ScorecardEntry.createCriteria(DQLString); scorecardCriteria.setQueryParameter("projectContext",scorecard.projectContext); scorecardCriteria.setQueryParameter("parentType",scorecard.parentType); scorecardCriteria.setQueryParameter("parentId",scorecard.id); scorecardCriteria.setQueryParameter("milestone",scorecard.milestone);  Log.write("***** " + String(scorecardCriteria));  scorecardRef = cac_com_example_msscorecard_data_ScorecardEntry.findByCriteria(scorecardCriteria).get(0);

     

    In the log there is now a readable version of the search criteria:

     stdout - ***** CaseCriteria{query='projectContext=:projectContext and  parentType=:parentType and parentId=:parentId and milestone=:milestone', startPosition=0, pageSize=-1, queryParams='[milestone=[MS1],parentId=[null],projectContext=[AB],parentType=[AB]]'}

     

    It shows clearly that the "parentId" was not passed into the query. (scroll to the end of the line)


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...