Database Reference
In-Depth Information
Listing 3.6. Adding different property types to nodes
You'venowmadethegraphmodelricherbystoringadditionalinformationaboutnodesus-
ing properties.
Figure 3.9
illustrates the social network after the enhancements from
listing
3.5
(but not the example in
listing 3.6
)
have been applied.
Figure 3.9. Rich property graph representing the social network
Note
As we mentioned before, Neo4j does not allow
null
properties. If you need to remove
the property from a node, you have to do it explicitly using the Neo4j Core Java API:
Node.removeProperty(String propertyName);
.
Nextyouneedtoaddafewmorenodesrepresentingthemoviesthattheuserswatchedand
rated.