Completely revised orm example