• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating Neo4j Relationships in java

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic