[Bug 681] New: new "DISTINCT" based SQL for grouping causes an error with H2

View: New views
2 Messages — Rating Filter:   Alert me  

[Bug 681] New: new "DISTINCT" based SQL for grouping causes an error with H2

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=681

           Summary: new "DISTINCT" based SQL for grouping causes an error
                    with H2
           Product: Helma
           Version: CVS trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P5
         Component: Database Layer
        AssignedTo: helma-dev@...
        ReportedBy: maksim.lin@...


The error is:

Caused by: org.h2.jdbc.JdbcSQLException: Order by expression START_TIME must be
in the result list in this case; SQL statement:
SELECT DISTINCT EVENTS.START_DATE FROM EVENTS ORDER BY START_TIME [90068-109]

The relevant bit of a stack strace is:

Caused by: java.lang.RuntimeException: Error retrieving NodeIDs
        at
helma.objectmodel.db.WrappedNodeManager.getNodeIDs(WrappedNodeManager
.java:133)
        at helma.objectmodel.db.SubnodeList.update(SubnodeList.java:135)
        at
helma.objectmodel.db.SegmentedSubnodeList.update(SegmentedSubnodeList
.java:234)
        at helma.objectmodel.db.Node.loadNodes(Node.java:1435)
        at helma.objectmodel.db.Node.numberOfNodes(Node.java:1412)
        at helma.scripting.rhino.HopObject.jsFunction_count(HopObject.java:422)
        at helma.scripting.rhino.HopObject.jsFunction_size(HopObject.java:431)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


This was from using the following ORM config.

Event prototype:

events = collection(Event)
events.group = START_DATE
events.group.order = START_TIME
events.group.prototype = EventGroup

with the EventGroup prototype simply having a:
_children = collection(Event)

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 681] new "DISTINCT" based SQL for grouping causes an error with H2

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=681


Hannes Wallnoefer <hannes@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |hannes@...
         Resolution|                            |WONTFIX




--- Comment #1 from Hannes Wallnoefer <hannes@...>  2009-11-17 10:46:15 ---
As discussed on the mailing list, this is not a bug - H2 can't sort a grouped
select by a column that may have multiple values for each group.

http://groups.google.com/group/helma/tree/browse_frm/thread/64ded1b15172a797/138775b8cbf03d9e?rnum=1&_done=%2Fgroup%2Fhelma%2Fbrowse_frm%2Fthread%2F64ded1b15172a797%3F#doc_5787ef09f38f780e

Closing as wontfix.

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev