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 #10519 (closed)

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

Bug: conn.getObjects("Plate") by ownerId

Reported by: wmoore Owned by: wmoore
Priority: major Milestone: OMERO-4.4.7
Component: OmeroPy Version: n.a.
Keywords: n.a. Cc: pwalczysko
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2013-04-09 (7))

Description

If we getObjects("Plate") and filter by ownerId we get

>>> p = omero.sys.Parameters()
>>> p.theFilter = omero.sys.Filter()
>>> eid = conn.getEventContext().userId
>>> p.theFilter.ownerId = rlong(eid)
>>> plates = conn.getObjects("Plate", params=p)
>>> for pp in plates:
>>> ...      print pp

Traceback (most recent call last):
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 3428, in __call__
    return self.f(*args, **kwargs)
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero_api_IQuery_ice.py", line 213, in findAllByQuery
    return _M_omero.api.IQuery._op_findAllByQuery.invoke(self, ((query, params), _ctx))
QueryException: exception ::omero::QueryException
{
    serverStackTrace = ome.services.query.QueryException: Illegal query:select obj from Plate as obj join fetch obj.details.owner join fetch obj.details.group join fetch obj.details.creationEvent left outer join fetch obj.screenLinks spl left outer join fetch spl.parent sc where owner.id = (:eid)
Invalid path: 'owner.id' [select obj from ome.model.screen.Plate as obj join fetch obj.details.owner join fetch obj.details.group join fetch obj.details.creationEvent left outer join fetch obj.screenLinks spl left outer join fetch spl.parent sc where owner.id = (:eid)]

Change History (2)

comment:1 Changed 11 years ago by wmoore

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 11 years ago by jburel <j.burel@…>

(In [a1e0fe7e34ecffc4aea37c2c2673bf4d14c43da7/ome.git] on branch develop) Blitz: Adding 'as owner' into Plate._getQueryString(). See #10519

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.65690 sec.)

We're Hiring!