OFBiz
  1. OFBiz
  2. OFBIZ-3520

revision 897605 breaks certain delegator.find() EntityListIterator calls

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: SVN trunk
    • Fix Version/s: None
    • Component/s: framework
    • Labels:
      None

      Description

      We recently upgraded our internal ofbiz package to a newer trunk version, one from the end of January. Ean then deployed that to the server it was developing on. This broke requirements processing. I have reduced it, however, to a simple patch, that works if I revert 897606, but breaks when it is applied.

      Test case will be attached.

        Activity

        Hide
        David E. Jones added a comment -

        In rev 916781 this "COUNT(DISTINCT " stuff has been disabled with some comments about the issues. You'll want to update past 916782 as well since that undoes a stupid thing I left on accident from starting to test this, before realizing that giving up is the better approach here. There are just too many issues with it.

        Show
        David E. Jones added a comment - In rev 916781 this "COUNT(DISTINCT " stuff has been disabled with some comments about the issues. You'll want to update past 916782 as well since that undoes a stupid thing I left on accident from starting to test this, before realizing that giving up is the better approach here. There are just too many issues with it.
        Hide
        Adam Heath added a comment -

        Yeah, sorry, 897605 is the one that I am talking about.

        I tried initially with a revsion from a few days ago. But the one that we were running when we discovered the problem was from the end of januanry, 902021.

        The test case doesn't need an assertion. An exception is throw, which leaves the method, and is caught by junit, causing the test case to fail. A proper run will not throw a test case, and that is not something that you can test with junit, and still maintain 100% coverage of the test case.

        This breaks with derby, haven't tried the test case against any other database.


        [JUNIT (error)] - testFoo : org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT COUNT(1) FROM (SELECT COUNT(DISTINCT COUNT(DISTINCT T.TESTING_TYPE_ID)) FROM OFBIZ.TESTING T INNER JOIN OFBIZ.TESTING_NODE_MEMBER TNM ON T.TESTING_ID = TNM.TESTING_ID GROUP BY TNM.TESTING_NODE_ID) TEMP_NAME (Aggregate COUNT contains one or more aggregates.)

        Show
        Adam Heath added a comment - Yeah, sorry, 897605 is the one that I am talking about. I tried initially with a revsion from a few days ago. But the one that we were running when we discovered the problem was from the end of januanry, 902021. The test case doesn't need an assertion. An exception is throw, which leaves the method, and is caught by junit, causing the test case to fail. A proper run will not throw a test case, and that is not something that you can test with junit, and still maintain 100% coverage of the test case. This breaks with derby, haven't tried the test case against any other database. – [JUNIT (error)] - testFoo : org.ofbiz.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT COUNT(1) FROM (SELECT COUNT(DISTINCT COUNT(DISTINCT T.TESTING_TYPE_ID)) FROM OFBIZ.TESTING T INNER JOIN OFBIZ.TESTING_NODE_MEMBER TNM ON T.TESTING_ID = TNM.TESTING_ID GROUP BY TNM.TESTING_NODE_ID) TEMP_NAME (Aggregate COUNT contains one or more aggregates.) –
        Hide
        David E. Jones added a comment -

        When you write 897606 do you mean 897605, ie the same revision as in the header?

        Which revision of the trunk did you test with, the most recent? You wrote: "a newer trunk version, one from the end of January." Does that mean you updated to a trunk revision from the end of January?

        Also, the test case does not have any assertions, which brings up a couple of questions:

        1. what happened when you ran this? (any errors, exceptions, etc?)
        2. how is that different from what you expected to happen?

        One last thing (I think last anyway), since this deals with SQL generation that is database sensitive, which database were you running this against?

        Show
        David E. Jones added a comment - When you write 897606 do you mean 897605, ie the same revision as in the header? Which revision of the trunk did you test with, the most recent? You wrote: "a newer trunk version, one from the end of January." Does that mean you updated to a trunk revision from the end of January? Also, the test case does not have any assertions, which brings up a couple of questions: 1. what happened when you ran this? (any errors, exceptions, etc?) 2. how is that different from what you expected to happen? One last thing (I think last anyway), since this deals with SQL generation that is database sensitive, which database were you running this against?

          People

          • Assignee:
            David E. Jones
            Reporter:
            Adam Heath
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development