[ome-devel] dataset.getname() gives error? Matlab
Will Moore
will at lifesci.dundee.ac.uk
Fri Aug 17 13:52:05 BST 2012
Hi Ian,
This query should load the Datasets
'select l from DatasetImageLink as l left outer join fetch l.parent as ds where l.child.id = '
Maybe even
'select l from DatasetImageLink as l left outer join fetch l.parent where l.child.id = '
NB: I noticed you didn't use your param object below.
Try
> list = service.findAllByQuery('select l from DatasetImageLink as l left outer join fetch l.parent where l.child.id =:ids ', param);
Will.
On 17 Aug 2012, at 12:09, Munro, Ian wrote:
> Hello
>
> I wonder if anyone can help me with this?
> Given a valid imageId I'm trying to get the name of the parent dataset using Matlab.
>
> this snippet
>
> ids = java.util.ArrayList();
> ids.add(imageId); %add the id of the image.
>
> param = omero.sys.ParametersI;
> param.addIds(ids);
> service = session.getQueryService();
> list = service.findAllByQuery(['select l from DatasetImageLink as l where l.child.id = ', num2str(ID)], []);
> dataset = list.get(0).getParent();
>
> datasetId = dataset.getId().getValue()
>
> runs fine & gives me a datasetId that looks good (ie matches what I see with insight)
>
> However this line
>
> dataset.getName()
>
>
> Gives me the following errors
>
> Error using omero.model.DatasetI/getName
> Java exception occurred:
> omero.UnloadedEntityException: Object unloaded:omero.model.DatasetI at d0c94c0
> at omero.model.DatasetI.errorIfUnloaded(DatasetI.java:22)
> at omero.model.DatasetI.getName(DatasetI.java:668)
> at omero.model.Dataset.getName(Dataset.java:218)
>
> Any help welcome at this point. I assume "Object Unloaded" is a clue here?
>
> Thanks
>
> Ian
>
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20120817/b67e56f9/attachment.html>
More information about the ome-devel
mailing list