Task #8955 (new)
Opened 12 years ago
Last modified 12 years ago
BUG: omero.sys.Parameters vs Ice.Current — at Version 2
Reported by: | atarkowska | Owned by: | jamoore |
---|---|---|---|
Priority: | critical | Milestone: | OMERO-4.4 |
Component: | Services | Version: | n.a. |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | 2012-06-05 (16) |
Description (last modified by atarkowska)
The latest changes that allows passing context groupId via Ice.Current to overwrite eventContext.groupId change the usage of omero.sys.Parameters().filter.groupId.
Competitions:
| omero.sys.Parameters.filter.groupId | Ice.Current | groupId | |======================================================================================| | null / >=0 | null | EventContext.groupId | | null / >=0 | omero.group >= 0 | Ice.Current | | null | omero.group = -1 | cross group call | | >=0 | omero.group = -1 | Parameters.filter.groupId |
Example of overwriting:
p = omero.sys.Parameters() p.map = {} f = omero.sys.Filter() f.limit = rint(100000) f.groupId = rlong(group_id) f.ownerId = rlong(experimenter_id) sql = "select i from Image i join fetch i.details.owner join fetch i.details.group" conn.getQueryService().findAllByQuery(sql, p, {'omero.group': "-1"})
As discussed, would be nice to invoke wrapper to make sure services' methods are forced to use default value if Ice.Current is not set , like omero.group = -1. That is especially important in ISearch and ITimiline, as those services are expected to make cross group calls by default and results could be easily narrow down by Parameters then.
Change History (2)
comment:1 Changed 12 years ago by atarkowska
- Component changed from General to Services
- Priority changed from minor to critical
- Summary changed from BUG: omero.sys.Parameters vs _ctx to BUG: omero.sys.Parameters vs Ice.Current
comment:2 Changed 12 years ago by atarkowska
- Description modified (diff)