cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Upgrade @Properties(prefix = "property", allowCast = true) to SDN6

myshareit
Node Clone

I'm trying to upgrade my SDN application to SDN 6 and right now don't know how to upgrade the following construction:

@Properties(prefix = "property", allowCast = true)
private Map<String, Object> properties;

How to define it in SDN 6? Thanks!

2 REPLIES 2

X-Post from: Spring Data Neo4j @Properties annotation - Stack Overflow

You would use the @CompositeProperty annotation. This will work with Map<String/Enum, Object> .

Here is the link to the documentation with some further information. Spring Data Neo4j

Thanks for your answer! Unfortunatly, I unable to fully test it right now because blocked with Migration to SDN 6 - issue with relationship between nodes

Also, one addtional question regarding allowCast = true attribute of @Properties annotation. I do not see the same attribute for the @CompositeProperty. Do we still need it or @CompositeProperty will work out of the box without such attribute? Thanks!

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online