maria-grigorieva / icatproject

Automatically exported from code.google.com/p/icatproject
0 stars 0 forks source link

export does not output objects in the proper order #155

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have some content in the ICAT including a Dataset that is related to a Sample
2. Export the ICAT content using the export call of the ICAT RESTful interface.
3. Clear the ICAT.
4. Re-Import the ICAT content using the import call of the ICAT RESTful 
interface.

What is the expected output? What do you see instead?

Expect the ICAT content to get properly imported back.  Observed result was an 
error message from Import:

ICATNoObjectError: Import failed when looking up existing object for attribute 
sample at line 200

Please use labels and text to provide additional information.

The problem becomes apparent by looking into the export file, see attachment: 
Datasets (line 199) have been output before Samples (line 280).  But since 
Dataset references Sample, Sample must get created earlier during import.

Indeed, if one manually edits the export file, moving Sample and SampleType in 
front of Dataset, the import succeeds without error and the ICAT content gets 
restored.

Original issue reported on code.google.com by rolf.kr...@helmholtz-berlin.de on 16 Apr 2015 at 2:04

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, I accidently uploaded the wrong export file.  This was the one that 
works after manual editing.  The one originally created by the export call is 
this here.

Original comment by rolf.kr...@helmholtz-berlin.de on 16 Apr 2015 at 2:12

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dr.s.m.f...@gmail.com on 6 May 2015 at 9:09