OrientVertex vertexObject = graph.addVertex("class:"+ClassProperties.VERTEXCLASSNAME);
if(vertexObject == null){
error.put(Constants.ERROR_KEY, "Bad request.");
return new ResponseEntity<String>(error.toString(), HttpStatus.BAD_REQUEST);
}
vertexObject.setProperty(ClassProperties.PROPERTY_ID, UUID.randomUUID().toString());
vertexObject.setProperty(ClassProperties.PROPERTY_NAME, request.getString(ClassProperties. PROPERTY_NAME));
vertexObject.setProperty(ClassProperties.PROPERTY_DESCRIPTION, request.getString(ClassProperties. PROPERTY_DESCRIPTION));
Hi,which version are you using ?
public class FactoryService {
static Logger logger = Logger.getLogger(FactoryService.class);
public static OrientGraphFactory factory;
static {
logger.info("factory creating");
factory = new OrientGraphFactory(Constants.DATABASE_URL).setupPool(10, 40);
}
public OrientGraphFactory getGraphFactory(){
if(factory == null){
factory = new OrientGraphFactory(Constants.DATABASE_URL).setupPool(10, 40);
}
return factory;
}
public static OrientBaseGraph getNoTxGraph(){
return factory.getNoTx();
}
public static OrientBaseGraph getTxGraph(){
return factory.getTx();
}
}
--
---
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-database+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
Hi Luigi,1. Yes I am using for commit() for notTx() and Tx() methods. Sometimes I am getting error if i did not put this statement. That is why I added this statement.my Question : Is there any problem with using this commit() statement ?
2. I am creating schema (Only classanem and with clusters) with java program. Generally I will create schema with OrientStudio web console. there I will specify all the properties and property type. Why I am creating Vertex or Edge class from java is , We can specify number of clusters for that vertex of Edge. If I create through OrientStudio web console it will allocate only two clusters .
my Question : is there any problem with allocating toomany clusters?
3. I am not writing any test cases in my program. (note : It is Spring boot rest services )
thanksGopinath Chilukuri
To unsubscribe from this group and stop receiving emails from it, send an email to orient-database+unsubscribe@googlegroups.com.