My Shitty Code

Embracing the Messiness in Search of Epic Solutions

Tag: Neo4J

  • Neo4j: WHERE Clause vs Curly Braces in MATCH Clause

    PROBLEM With Cypher Query Language, you can write similar queries that yield the same result. For example:- … AND … … returns the same result. So, which one is better in terms of performance? SOLUTION Neo4j provides a very helpful command called EXPLAIN that allows us to do some investigation ourselves. The EXPLAIN command displays […]

  • Neo4j: Playing with Cypher Query Language

    PROBLEM Every week, my shitty coworkers struggle to reach consensus on where to go for lunches and what beverages to order in the morning. SOLUTION To further understand the phenomenon of this first world problem, here’s a shitty graph database powered by Neo4j to visualize the love/hate relationship between my shitty coworkers and the shitty […]

  • Spring Data Neo4J: Requested a entity of type ‘X’, but the entity is of type ‘Y’

    PROBLEM Let’s assume we have a node entity like this:- When saving this entity, we get this exception:- SOLUTION This problem occurs because relationship likes is being used by both Restaurant entity and Beverage entity. To fix it, we need to enforce the target type.