Re: [Neo4j] Relationship type with name determined by a variable?

2010-09-20 Thread Mattias Persson
2010/9/19 Martin Aryee martin.ar...@gmail.com Thanks for the responses. Since I'm new to this graph db thing I might very well just be setting up my model wrong. Yeah, since there are more than one way to model your domain it's not always clear which solution is the best. I'm representing

[Neo4j] Relationship type with name determined by a variable?

2010-09-19 Thread Martin Aryee
Hi, I was wondering if it's possible to create a new relationship type with a name that's determined by a variable. For example, when creating a relationship knows I'd typically write: n1 = graphdb.node() n2 = graphdb.node() n1.knows(n2) Instead of the last line, I'd like to do something

Re: [Neo4j] Relationship type with name determined by a variable?

2010-09-19 Thread Victor Augusto de Campos
Sorry if I'm saying something silly, I started playing with neo a couple of weeks ago only, but afaik relationships can only be created using enums because of the nature of enums (representing fixed set of constants) and how that helps to maintain consistent relationship types that your

Re: [Neo4j] Relationship type with name determined by a variable?

2010-09-19 Thread Jawad - CitizenPlace
Hi, you can easily create a relationship type with a name that is not detemined from an enum. In fact, you can use any string. You have to create a DynamicRelationshipType (http://api.neo4j.org/current/org/neo4j/graphdb/DynamicRelationshipType.html). You can then write: relationship_type =

Re: [Neo4j] Relationship type with name determined by a variable?

2010-09-19 Thread Martin Aryee
Thanks for the responses. Since I'm new to this graph db thing I might very well just be setting up my model wrong. I'm representing a group of scientists and want to somehow capture the list of publications they have coauthored. Each publication has a set of keywords representing research