Fix deprecation warnings.
Merge branch 'hotfix/fix-deprecate-from-orm'