class Picture
property :name
property :user_ids
serialize :user_ids
end
Picture.create(name: '1', user_ids: [1,4,5])
How to find all pictures having user id 1 in user_ids property
I am trying this in way:
Picture.as(:p).where('ALL(x IN [1] WHERE x IN p.user_ids)')
Neo4j.rb version - neo4j (8.0.13)
Neo4j - 3.1.1 Enterprise
But its not working. Or there is any better way to store array and query it as well, Any help would be very appreciable
EDIT: Shown Bruno's Example & My Node description above I have used example node
@Bruno example is working fine.
Here is my Neo4j node view
match (p:Place) where ALL(x IN [14] WHERE x IN p.from_airport_ids) return p
This is not working in my case
class Place
include Neo4j::ActiveNode
property :name
property :from_airport_ids
serialize :from_airport_ids
end
Create Place through API
{
"place":{
"name":"Name",
"from_airport_ids":[14,44,67]
}
}
Is it related to how my array values stored in node and how @Bruno example values are stored?