Task #546 (closed)
IPojos createDataObjects returning unloaded entities
Reported by: | jburel | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Milestone: | 3.0-Beta1 |
Component: | API | Version: | 3.0-M3 |
Keywords: | n.a. | Cc: | cxallan |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description
Problem when creating annotations and use createDataObjects.
If I use createDataObject on each annotation it works!!
pseudo code:
I first create an annotation:
Dataset m = (Dataset) annotatedObject; DatasetAnnotation annotation = new DatasetAnnotation(); annotation.setContent(data.getText()); annotation.setDataset(m);
then do
IPojos.createDataObject(annotation, options)
the IObject returned contains the annotated data object (in this case the dataset)
if I create several annotations i.e. one per annotatedObject
then call
IPojos.createDataObjects(annotation[], options)
IObjects returned don't contain the annotated data object
Change History (3)
comment:1 Changed 17 years ago by jmoore
- Milestone changed from Unscheduled to 3.0-Beta1
- Version changed from 3.0-Beta1 to 3.0-M3
comment:2 Changed 17 years ago by jmoore
- Cc callan added
- Resolution set to fixed
- Status changed from new to closed
- Summary changed from IPojos createDataObjects to IPojos createDataObjects returning unloaded entities
r1120 fixes. UpdateImpl?.saveAndReturnArray was returning the original value rather than the copy. This was luckily non-dangerous, because the ID was being transfered to the originals and then they were unloaded before return. However, no telling how many misunderstandings have been caused by this. I'll have to go back and review various failing tests.
comment:3 Changed 17 years ago by jmoore
r1121 fixes resulting problems. Specifically that methods which formerly passed in an array of some subclass of IObject and expected to get a similarly typed array back out would throw ClassCastExceptions (because arrays don't play well with generics). Now we'll have to manually create such an array and use System.arraycopy or just pass back the IObject[].
Let annotation and dataset be newly created objects via ipojos.createDateObject(obj,null). Then:
throws IllegalStateException at the marked line XXX. Does that look right?