Hi,
I want a Customer object, the customer has a Address object which is not a relation. only the specific customer has this address. same with phone numbers, websites and so.
I would like to map my java NodeEntity to save Address Object as embedded.
Like MongoDB, with search by embedded field
Possible?
How?
if not, what can be a good solution without having another database?
and so forth. For simpler types, like phone number and website, you could get away with just having properties on the :Customer itself. For multi-field objects, like possibly :Address, a separate node may make more sense.
Your lookup Cypher would be performing a match on indexed properties of an :Address node using a pattern that would include the customer, so it's one quick traversal after finding the address in question to get to the customer.
There is some interest in having richer support for nested maps and JSON-like properties, though we'll have to finish up our 4.0 work before determining the course for those.
There are a couple issues on github open for this. Here's one.
So the fate of this depends on both prioritization against the other features we want to implement, as well as on the decisions of the OpenCypher group.
You might consider opening a new issue/request for this on the OpenCypher github