[ome-users] QueryService

Chris Allan callan at lifesci.dundee.ac.uk
Fri Nov 6 14:37:06 GMT 2009


Have you tried "left outer join fetch"?

-Chris

On 6 Nov 2009, at 14:29, Woodbridge, Mark R wrote:

> Well, yes. The actual code I'm running is:
>
> IObject image = factory.getQueryService().findByQuery("select i from  
> Image i join fetch i.pixels where i.id = :id", new  
> ParametersI().add("id", rlong(id)));
>
> The problem is that it won't in a session owned by root (it returns  
> the aforementioned error). It works fine in a session owned by the  
> owner of the image, but this means sudo-ing. Just wondered why I  
> can't do it as the super user...
>
> -----Original Message-----
> From: Chris Allan [mailto:callan at lifesci.dundee.ac.uk]
> Sent: 06 November 2009 14:25
> To: Woodbridge, Mark R
> Cc: ome-users at lists.openmicroscopy.org.uk
> Subject: Re: [ome-users] QueryService
>
> Something that looks like this:
>
> Parameters p = new Parameters();
> p.setId(1L)
> List<Image = iQuery.findAllByQuery(select i from Image i join fetch
> i.pixels where i.id = :id);
>
> ??
>
> -Chris
> On 6 Nov 2009, at 14:02, Woodbridge, Mark R wrote:
>
>> Hi,
>>
>> I'm using the client API from Java to run the query:
>>
>> select i from Image i join fetch i.pixels where i.id = :id
>>
>> I'm doing this in order to get pixels IDs to pass to the thumbnail
>> service. When I run it as the OMERO super user I get the message:
>>
>> "Null parameters not allowed: o_id"
>>
>> I assumed that image Ids would be unique, but it looks like a need
>> to pass the ID of the owner, as well as the image ID. Is this
>> correct? Perhaps I have misunderstood...
>>
>> Mark.
>> _______________________________________________
>> ome-users mailing list
>> ome-users at lists.openmicroscopy.org.uk
>> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
>




More information about the ome-users mailing list