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
This is the same problem as #788 ; where get_or_create/create_or_update creates a Cypher MERGE, using unique properties as key. So in your case, both uid and name are used for the merge. But since you let neomodel create the uid, then you have two different Jill nodes, with different uids.
This is a wrong behaviour in neomodel in my opinion, as I can see that users would do as you did (let neomodel handle the uid creation); but I also understand the way those methods are built, so I will admit I am undecided about how to fix this.
I'm also having this problem and I'd appreciate a workaround for updating behaviours for now.
At the moment, I made changes like the following:
class Person(StructuredNode):
#uid = UniqueIdProperty()
name = StringProperty(unique_index=True, required =True, primary_key=True)
age = IntegerProperty(index=True, default=0)
And I do get the expected behaviour. But I don't know what the implications are. At least, I guess you need to make sure the 'name' is unique on every 'create/insert' operation to avoid integrity violations. But I don't now what happens to the uuid in this case, or does it really matter?
Expected Behavior (Mandatory)
I am ingesting a node again by bulk create_or_update option but while filtering, it still shows 2 nodes. Am i giving the right constraints?
How to Reproduce the Problem
Screenshots (where it's possibile)
Specifications (Mandatory)
neomodel==5.3.1
Versions
OS: ubuntu 20.04
Neo4j: neo4j 4.1.13
The text was updated successfully, but these errors were encountered: