-- PedroRio - 31 Mar 2010

XEO Known Issues

This page is compendium of situations and issues about XEO Core. Following is the list of situations documented:

The clone() method of a boObject instance does not duplicate attributes of type AttributeBinaryData

The clone() method in the boObject class does duplicate binary attributes (files) but only creates a reference in the cloned instance. In order to be able to fully clone the instance you need to duplicate the file yourself, like in the following code:

            boObject original;
            boObject toClone = original.cloneObject();

            iFileServer fs = new iFileServer();
            fs.mount();
            iFile file = original.getAttribute("attribute_binary_content").getValueiFile();
            String filedir = "//" + BasiciFile.IFILE_SERVICE_NAME + "/" + file.getName();
            iFile xfiledir = fs.getFile(filedir);
            toClone.getAttribute("attribute_binary_content").setValueiFile(xfiledir);
            xfiledir.setBinaryStream(file.getInputStream());
            toClone.update()

If the instance has several binary attributes you need to this step once for each attribute.


This topic: WebXEO > XeoPrimerXeoCore > XEOPrimerKnownIssues
Topic revision: r5 - 2011-04-04 - NicolauGrosskopf
 
This site is powered by the TWiki collaboration platform Powered by Perl

No permission to view TWiki.WebBottomBar