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