Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #1232 (new)

Opened 15 years ago

Last modified 14 years ago

Omitting LIMIT/OFFSET requires use of DISTINCT

Reported by: jamoore Owned by: jamoore
Priority: critical Milestone: Unscheduled
Component: General Version: 3.0-M1
Keywords: n.a. Cc: jburel, atarkowska, callan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

In r3997, QueryImpl was modified to not explicitly call setFirstResults or setMaxResults if Parameters.Filter or offset and limit (respectively) were null. Oddly, this caused Hibernate calls to start returning duplicate objects. Using "distinct" in the query solves the problem, but this was too large a change too late in the milestone.

Needs to be re-examined.

Change History (5)

comment:1 Changed 15 years ago by jmoore

Note: while re-examining this, it may also be a good time to consider adding a lower default LIMIT. Say 100000 rather than Integer.MAX_VALUE.

comment:2 Changed 15 years ago by jmoore

r4023 reverts to always setting LIMIT and OFFSET for 4.0.

comment:3 Changed 15 years ago by jmoore

Note: joining annotationLinks can possibly cause duplicate return values even with setFirstResult(), etc. Omitted the joins from the following query prevent the issue:

 612         params = omero.sys.Parameters(map={"id": rlong(id)})
 613         datasets = self.query_service.findAllByQuery(
 614                 "select d from Dataset as d " \
 615                 "left outer join fetch d.annotationLinks as link " \
 616                 "left outer join fetch link.child " \
 617                 "join d.projectLinks as p_link " \
 618                 "where p_link.parent.id = :id order by d.name",
 619                 params)

comment:4 Changed 15 years ago by jmoore

  • Milestone changed from OMERO-Beta4.1 to OMERO-Beta4.2

Moving to "big things" considerations in 4.2

comment:5 Changed 14 years ago by jmoore

  • Milestone changed from OMERO-Beta4.2 to Unscheduled
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67855 sec.)

We're Hiring!