aspose file tools
The moose likes Neo4j and the fly likes Creating Neo4j Relationships in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Databases » Neo4j
Bookmark "Creating Neo4j Relationships in java" Watch "Creating Neo4j Relationships in java" New topic
Author

Creating Neo4j Relationships in java

ashwini hirlekar
Greenhorn

Joined: Apr 01, 2014
Posts: 8
I am creating unique neo4j relationships in java class based on no. of column values in database. Value of column "Interface_Name" will be assigned to each relationship.My Code :

while(rs.next()){
String rel=rs.getString("Interface_Name");
GraphDatabaseService graphDb = new EmbeddedGraphDatabase("D://My Graph");
Transaction tx=graphDb.beginTx();
try{
RelationshipType rel = DynamicRelationshipType.withName(rel); //Gives error since "rel" is string
//
.....
tx.success();
}
How can i create multiple relationship Types based on Column values in DB?Inside while loop Relationship Types should get created according to DB values.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Creating Neo4j Relationships in java