File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 REST with Spring (video course) this week in the Spring forum!
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.
I agree. Here's the link:
subject: Creating Neo4j Relationships in java
It's not a secret anymore!