orm: complete fix with doc corrections