Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

Dynamically map node properties


I am trying to map the properties of a node entity to my prop field, but I can't seem to get it work. For some reason, it's always null.

I've tried to follow this: But I am not sure what I am doing wrong.

open class Symptom(
        var id: String
        @Relationship(type = "SUGGESTS", direction = Relationship.OUTGOING)
        var suggests: MutableSet<SuggestsRel>? = mutableSetOf()

        @Properties(allowCast = true)
        var prop: MutableMap<String, Any>? = mutableMapOf()

Graph Voyager

Hi vajnatimi,
You have to ensure that you are either annotating the proper depth in your Spring Data repo interface, or (if you're specifying your own queries) that you are returning both relationships and nodes. If you're used to the browser, it may seem like you can omit relationships, but you cannot with OGM.