Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-20-2019 07:54 AM
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: https://neo4j.com/docs/ogm-manual/current/reference/#reference:annotating-entities:node-entity:dynam... But I am not sure what I am doing wrong.
@NodeEntity
open class Symptom(
@Id
var id: String
)
{
@Relationship(type = "SUGGESTS", direction = Relationship.OUTGOING)
var suggests: MutableSet<SuggestsRel>? = mutableSetOf()
@Properties(allowCast = true)
var prop: MutableMap<String, Any>? = mutableMapOf()
}
05-24-2019 07:01 PM
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.
All the sessions of the conference are now available online