I'm running this on 1.7.7:

 ODatabaseDocument db = new ODatabaseDocumentTx("plocal:/tmp/test");
 if (!db.exists()) db.create();

 db.open("admin", "admin");
 ODocument doc = new ODocument("TestClass");
 doc.field("test", new Object[5]);
 doc.save();
 db.close();
 
 db.open("admin", "admin");
 for (ODocument d : db.browseClass("TestClass")) {
      System.out.println( d.field("test") );
 }
 db.close();


which results in 

com.orientechnologies.orient.core.exception.OSerializationException: Found 
invalid % character. Ensure it is opened and closed correctly.
 at com.orientechnologies.orient.core.serialization.serializer.
OStringSerializerHelper.parse(OStringSerializerHelper.java:356)
 at com.orientechnologies.orient.core.serialization.serializer.
OStringSerializerHelper.smartSplit(OStringSerializerHelper.java:198)
 at com.orientechnologies.orient.core.serialization.serializer.
OStringSerializerHelper.smartSplit(OStringSerializerHelper.java:185)
 at com.orientechnologies.orient.core.serialization.serializer.record.string
.ORecordSerializerSchemaAware2CSV.fromString(
ORecordSerializerSchemaAware2CSV.java:107)
 at com.orientechnologies.orient.core.serialization.serializer.record.string
.ORecordSerializerStringAbstract.fromStream(ORecordSerializerStringAbstract.
java:661)
 at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.
deserializeFields(ORecordSchemaAwareAbstract.java:436)
 at com.orientechnologies.orient.core.record.impl.ODocument.
deserializeFields(ODocument.java:1510)
 at com.orientechnologies.orient.core.record.impl.ODocument.checkForFields(
ODocument.java:1644)
 at com.orientechnologies.orient.core.record.impl.ODocument.rawField(
ODocument.java:563)
 at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.
java:583)
...

Is this a bug? 
I mean if I'm storing an invalid value shouldn't I get an error while 
storing it and not while trying to read it? 

-- 

--- 
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.

Reply via email to