What I’m trying to do:
Save a row(model) that has a link to another table, using buffered=True with model classes. I have a phase row that has parent=row_from_project_table.
What I’ve tried and what’s not working:
phase = Phase()
project.save()
phase.parent = project
phase.save()
This actually works (I checked the db), but I guess returning the value from the server, this happens:
anvil.server.SerializationError: Cannot serialize return value from function. Linked Rows with buffered changes cannot be serialized. Call save() or reset() first, (Found <project_estimator.models.project.Project object>)
I don’t have this issue with buffered=False. But then I don’t get the advantages of using buffered changes with writeback bindings and one save() call.