You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using your gem to make "withinDistance" spatial queries with rails and neo4jrb gem.
Here's my problem, I attached an after_save callback that calls the "add_to_spatial_layer" method to add the node to the layer.
The thing is, if I update the node, it re-calls the method to update the index accordingly to the new location of the node and it actually recreates a new index relationship each time I save the node which leads me to many relationships ! (see screenshot)
How can I do make sure to remove old relationship before creating a new one ? Is there something done in this gem to do that ?
The text was updated successfully, but these errors were encountered:
I don't use this gem, but I maintain the neo4j gem, and if you are using ActiveNode you can use the unique option on associations or creates_unique in ActiveRel
Hi,
I'm using your gem to make "withinDistance" spatial queries with rails and neo4jrb gem.
Here's my problem, I attached an after_save callback that calls the "add_to_spatial_layer" method to add the node to the layer.
The thing is, if I update the node, it re-calls the method to update the index accordingly to the new location of the node and it actually recreates a new index relationship each time I save the node which leads me to many relationships ! (see screenshot)
How can I do make sure to remove old relationship before creating a new one ? Is there something done in this gem to do that ?
The text was updated successfully, but these errors were encountered: