[ome-devel] Accessing OMERO.insight attachements via the API.
Jerome Avondo
jeromeavondo at msn.com
Tue Aug 4 11:00:49 BST 2009
Hi Jmarie
Adding unloadCollections() before I create/save the AnnoationLink has fixed the problem... FYI I was retrieving the Image object with a custom query;
String query_string = "select i from Image i " +
"left outer join fetch i.pixels pix " +
"left outer join fetch i.annotationLinks alinks " +
"left outer join fetch alinks.child as a " +
"left outer join fetch pix.dimensionOrder dimord " +
"left outer join fetch pix.pixelsType pixtype " +
"left outer join fetch pix.channels chan " +
"where i.id = :uId";
I guess having the ImageAnnotationLinks loaded was causing the error.
Thanks once again for your help!
J.
________________________________
> CC: ome-devel at lists.openmicroscopy.org.uk
> From: j.burel at dundee.ac.uk
> Subject: Re: [ome-devel] Accessing OMERO.insight attachements via the API.
> Date: Tue, 4 Aug 2009 10:44:28 +0100
> To: jeromeavondo at msn.com
>
>
> Hi Jerome
>
> Follow the code I use to link a file annotation (existing one) to an image
> Image image; //retrieve from server
> FileAnnotation fa;
> image.unloadCollections(); //to be on the save side.
> ImageAnnotationLink l = new ImageAnnotationLinkI();
> l.setParent(image);
> l.setChild(fa);
>
> IUpdatePrx service;
> service.saveAndReturnObject(l);
>
>
> I have tried with 4.0.3 and trunk. I cannot reproduce the error you sent.
>
> Jmarie
>
>
_________________________________________________________________
Windows Live Messenger: Celebrate 10 amazing years with free winks and emoticons.
http://clk.atdmt.com/UKM/go/157562755/direct/01/
More information about the ome-devel
mailing list