He I have a little bit trouble with arrays in OrientDB 1.7.4, maybe somebody can help me?
I have a array of *SomeObject[]*. *SomeObject* is part of the registered entities. Let's say I initialize the array with *new SomeObject[2] *and try to store the also registered entity *ContainsFieldOfTypeSomObjectArray, *then I got this if I call the getter for the array: *java.lang.NullPointerException* * at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.manageArraySave(OObjectProxyMethodHandler.java:470)* * at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.manageObjectCollections(OObjectProxyMethodHandler.java:392)* * at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.getValue(OObjectProxyMethodHandler.java:323)* * at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.getValue(OObjectProxyMethodHandler.java:293)* * at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.manageGetMethod(OObjectProxyMethodHandler.java:282)* * at com.orientechnologies.orient.object.enhancement.OObjectProxyMethodHandler.invoke(OObjectProxyMethodHandler.java:115)* If I store only *null* instead of a empty array everything is fine. But there is more :) I have an array with length '2', and set index [0] = new SomeObject(). Then I can store everything without problems and the getter returns an array with length '2' with [0] == 'SomeObject' and [1] == null. So everything works as aspected. But if I set index [1] = new SomeObject() and index [0] is still null I got this during save() java.lang.ClassCastException: SomeObject cannot be cast to com.orientechnologies.orient.core.db.record.OIdentifiable at com.orientechnologies.orient.core.db.record.ORecordLazyList.add(ORecordLazyList.java:43) at com.orientechnologies.common.collection.OMultiValue$1.add(OMultiValue.java:344) at com.orientechnologies.common.collection.OMultiValue.add(OMultiValue.java:394) at com.orientechnologies.orient.core.db.record.ORecordLazyList.addAll(ORecordLazyList.java:87) at com.orientechnologies.orient.core.db.record.ORecordLazyList.<init>(ORecordLazyList.java:72) at com.orientechnologies.orient.core.record.impl.ODocument.convertAllMultiValuesToTrackedVersions(ODocument.java:1562) at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:437) at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:435) at com.orientechnologies.orient.object.db.OObjectDatabaseTx.save(OObjectDatabaseTx.java:346) But only if index[0] of the array is null. I hope somebody can help me or have some adive. Maybe it's a bug ? Greetings Julian -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
