this.graph.createProperty(vertexType, "name", OType.EMBEDDEDLIST);
this is a container and needs the parameter linked-type or linked-class
--
---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/xWmAWQOPKwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public void setProperty(Vertex vertex, String key, String value) {
Set<String> keys = vertex.getPropertyKeys();
List<String> values = null; if(keys.contains(key)) { values = (List<String>)vertex.getProperty(key); values.add(value); } else { values = new ArrayList<String>(); values.add(value); } vertex.setProperty(key, values);}Exception in thread "main" com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record in cluster #11 at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:1052) at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:82) at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:333) at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:42) at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:333) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1381) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1370) at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1359) at com.tinkerpop.blueprints.impls.orient.OrientElement.save(OrientElement.java:150) at com.tinkerpop.blueprints.impls.orient.OrientElement.save(OrientElement.java:133) at com.tinkerpop.blueprints.impls.orient.OrientElement.setProperty(OrientElement.java:99)Caused by: java.lang.NullPointerException at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.put(OLocalHashTable.java:212) at com.orientechnologies.orient.core.index.engine.OLocalHashTableIndexEngine.put(OLocalHashTableIndexEngine.java:150) at com.orientechnologies.orient.core.index.OIndexDictionary.put(OIndexDictionary.java:44) at com.orientechnologies.orient.core.index.OIndexDictionary.put(OIndexDictionary.java:29) at com.orientechnologies.orient.core.tx.OTransactionNoTx.addIndexEntry(OTransactionNoTx.java:186) at com.orientechnologies.orient.core.index.OIndexTxAware.put(OIndexTxAware.java:80) at com.orientechnologies.orient.core.index.OIndexTxAware.put(OIndexTxAware.java:36) at com.orientechnologies.orient.core.index.OClassIndexManager.processIndexUpdateFieldAssignment(OClassIndexManager.java:398) at com.orientechnologies.orient.core.index.OClassIndexManager.processSingleIndexUpdate(OClassIndexManager.java:369) at com.orientechnologies.orient.core.index.OClassIndexManager.updateIndexEntries(OClassIndexManager.java:156) at com.orientechnologies.orient.core.index.OClassIndexManager.onRecordAfterUpdate(OClassIndexManager.java:131) at com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:266) at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.callbackHooks(ODatabaseRecordAbstract.java:1274) at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:1029) ... 14 moreException in thread "Thread-1" java.lang.NullPointerException at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.saveState(OLocalHashTable.java:369) at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.flush(OLocalHashTable.java:1141) at com.orientechnologies.orient.core.index.engine.OLocalHashTableIndexEngine.flush(OLocalHashTableIndexEngine.java:94) at com.orientechnologies.orient.core.index.OIndexAbstract.flush(OIndexAbstract.java:116) at com.orientechnologies.orient.core.index.OIndexManagerAbstract.flush(OIndexManagerAbstract.java:170) at com.orientechnologies.orient.core.index.OIndexManagerAbstract.close(OIndexManagerAbstract.java:282) at com.orientechnologies.orient.core.storage.OStorageAbstract.close(OStorageAbstract.java:120) at com.orientechnologies.orient.core.storage.OStorageEmbedded.close(OStorageEmbedded.java:70) at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.doClose(OLocalPaginatedStorage.java:713) at com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.close(OLocalPaginatedStorage.java:672) at com.orientechnologies.orient.core.Orient.shutdown(Orient.java:155) at com.orientechnologies.orient.core.OrientShutdownHook.run(OrientShutdownHook.java:28)
Orient Technologies
the Company behind OrientDBOrientVertexType instance = this.graph.createVertexType("instance", null); instance.createProperty("property_id", OType.STRING);instance.createProperty("property_names", OType.EMBEDDEDLIST, OType.STRING);instance.createProperty("property_alias", OType.EMBEDDEDLIST, OType.STRING); this.graph.createKeyIndex("property_id", Vertex.class, new Parameter<String, String>("class", "instance"), new Parameter<String, String>("type", "UNIQUE_HASH_INDEX"));this.graph.createKeyIndex("property_names", Vertex.class, new Parameter<String, String>("class", "instance"), new Parameter<String, String>("type", "DICTIONARY_HASH_INDEX"));this.graph.createKeyIndex("property_alias", Vertex.class, new Parameter<String, String>("class", "instance"), new Parameter<String, String>("type", "DICTIONARY_HASH_INDEX"));