Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-20-2019 09:07 AM
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?
Thanks
Solved! Go to Solution.
07-20-2019 11:19 AM
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
07-20-2019 10:12 AM
Neo4j doesn't currently have embedded objects. You can represent similar structure with separate nodes with relationships between them, like this:
(:Customer)-[:HAS_ADDRESS]->(:Address)
(:Customer)-[:HAS_PHONE_NUMBER]->(:PhoneNumber)
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.
07-20-2019 11:08 AM
Thank you.
Are there any plans for such feature?
07-20-2019 11:11 AM
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.
07-20-2019 11:15 AM
Can you please open this as a feature request so we can track the progress?
Much appreciated!
07-20-2019 11:19 AM
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
07-20-2019 12:39 PM
I will. thank you for you time
All the sessions of the conference are now available online