Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

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 New...