Fix resolvers and generated ToDb.