neo4jclient

Neo4J Query with multiple filter does not return the expected result

时光总嘲笑我的痴心妄想 提交于 2019-12-13 05:19:07
问题 I am using the following Neo4JClient code to query for all the shipment count that is due within a wee, one week to 21 days and greater than 21 days. var query = GraphClient.Cypher .Merge("(user:Person{InternalId:{userId}})") .WithParam("userId", userId) .With("user") .Match("(veh:Vehicle)<-[:HAS_VEHICLE_TYPE]-(load:ActiveShipment)-[:SHIPPED_BY]->(shipper:Shipper), (user)-[:WORKS_FOR_COMPANY]->(transporter:Transporter)") .Where("((load.RestrictedBidding = false) OR (user)-[:WORKS_FOR_COMPANY]

Neo4jClient Create Unique results in multiple duplicate nodes

╄→гoц情女王★ 提交于 2019-12-13 05:11:12
问题 I was wondering if some one can help me understand how Create Unique actually works in Neo4J. I am trying to register multiple addresses to a shipper node, where I expect the City, State and country to be same across the addresses so that they all point to the same node. However the issue is that the Create Unique is resulting in multiple instance of same node in the database. Here is the function I have to register an address with the shipper which I call multiple times with same Shipper

How to return COLLECT([role, app]) using Neo4jClient?

自作多情 提交于 2019-12-13 04:41:44
问题 I have the following Cypher which I am struggling to translate into the fluent syntax: MATCH (u:User)-[:HAS_ROLE]->(r:Role)-[:ROLE_OF]->(a:App) RETURN u AS User, COLLECT([r, a]) AS Roles This is what I have so far, but I can't figure out how to return the COLLECT([r, a]) as Roles. I am using a UserDetails class to enable passing the results to a View. var results = _graphClient.Cypher .Match("(user:User)-[:HAS_ROLE]->(role:Role)-[:ROLE_OF]->(app:App)") .Return((user,role,app) => new

ParameterNotFoundException when not setting specific params

跟風遠走 提交于 2019-12-13 03:43:43
问题 I am trying to use Neo4jClient to run the Cypher syntax: UNWIND {apples} AS newApple CREATE (a:Apple {newApple}) with a C# list of object List<Apple> a where the object could be: class Apple : Fruit { [JsonProperty(PropertyName = "Variety")] public String Variety { get; set; } } I do not want to spread out object variable specs in different places around the code. But running graphClient.Cypher .Unwind(a, "newApple") .Create("(a: Apple {newApple})") .ExecuteWithoutResults() throws:

Neo4jClient node ids

空扰寡人 提交于 2019-12-13 02:37:24
问题 I'm having trouble working out how the ID work in Neo4jClient. I want my .NET model to have an identifier property, and ideally I'd like it just to use the Neo4j autoincremented id for that node. However, no matter what case I use ( id , ID , Id ) in my model class, it always adds this as another field in Neo4j (keeping it as 0 when I create a new node). So when I view that node in the Neo4j browser, it has a <id> which is auto-incremented, and also my id field which is always 0 (unless I

neo4j use of list properties

给你一囗甜甜゛ 提交于 2019-12-13 01:31:02
问题 I have just started learning neo4j with c# client, and I'm having trouble understanding exact usage of list properies. In the example app Im using (which runs on top of "Cineasts Movies & Actors" dataset) there is a class Actor with following properties: public class Actor { public String id { get; set; } public String name { get; set; } public String birthplace { get; set; } public String birthday { get; set; } public String biography { get; set; } public List<Movie> filmography { get; set;

Cannot deserialize datetime property Neo4j using C# client

一笑奈何 提交于 2019-12-12 13:09:41
问题 I'm trying to get strongly typed objects back out of Neo4j using the C# client. This all works until I add a DateTime property. I've successfully inserted data into the Neo4j database and I can see it using the console. I can also query the data, but I can't return any strongly typed objects because the deserialization seems to fail. I'm using parameters to insert the data: _graphClient.Cypher .WithParams(new { id = node.Id, createdAt = node.CreatedAt, lastModified = node.LastModified })

Setting node labels with a parameter

那年仲夏 提交于 2019-12-12 06:43:44
问题 I'm trying to pile a load of Twitter data into Neo4J using the .Net Neo4JClient. It's essentially the same type of Twitter user data for each node, but some of the nodes have a different significance to others, hence I would like to label them differently. (I'm brand new both to Neo4J and the client, too). So I've been trying to label them like so: var query = _client.Cypher .Create("(primaryNode:nodeLabel {twitterUser})") .WithParams(new { nodeLabel = "nodeType", twitterUser } ); query

How to delete nodes recursively from a start node

℡╲_俬逩灬. 提交于 2019-12-12 04:49:20
问题 I have a graph which has a set of nodes and its children. There is a root node from where the rest of the nodes branch out. There are few sets of such node collection. I want to pick a root node and clear all its connections and nodes recursively, leaving the root node for future additions. start n=node:DataSpace(DataSpaceName="DS1") match (ds)-[r]-(e) delete e,r The above Query is definitely wrong, as it does not consider recursion and also the condition that entities have to be deleted

neo4jclient heterogenous data return

纵然是瞬间 提交于 2019-12-11 22:35:24
问题 Say I have the following (simplified): public class Item { public String Name { get; set; } public String Type { get; set; } } public class Armor : Item { public int AC { get; set; } public Armor () { Type = "Armor"; } } public class Weapon : Item { public int Damage { get; set; } public Armor () { Type = "Weapon"; } } public class Actor { ... } public class HasItem : Relationship<ItemProps>, IRelationshipAllowingSourceNode<Actor>, IRelationshipAllowingTargetNode<Item> { public readonly