orm: Fix serious logic in the save() method