issue #19550: Fixes to orm.