This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Getting MEAN with Mongo, Express, Angular, and Node and have Simon Holmes on-line!
See this thread for details.
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

JavaRanch » Java Forums » Databases » Neo4j
Bookmark "Creating Neo4j Relationships in java" Watch "Creating Neo4j Relationships in java" New topic

Creating Neo4j Relationships in java

ashwini hirlekar

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 :

String rel=rs.getString("Interface_Name");
GraphDatabaseService graphDb = new EmbeddedGraphDatabase("D://My Graph");
Transaction tx=graphDb.beginTx();
RelationshipType rel = DynamicRelationshipType.withName(rel); //Gives error since "rel" is string
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