I have an issue with creating a transaction. I get an error back that the objects are not in the same entity group.
I have a type called Relationship and I need to create a two way relationship between two parties.
def _transaction():
relationship1 = Relationship(firstParty = party1, secondParty = party2)
relationship2 = Relationship(firstParty = party2, secondParty = party1)
db.put([relationship1 , relationship2 ])
db.run_in_transaction(_transaction)
Both of the party objects are the same type. The business rule dictates both records need to be persisted or it needs to fail. The error comes from the party objects. the properties firstParty and secondParty are Reference Properties. How can i perform a transaction on this business rule?