class ManageIQ::Providers::Azure::NetworkManager::SecurityGroup < ::SecurityGroup
  has_many :vms, -> { distinct }, :through => :network_ports, :source => :device, :source_type => 'VmOrTemplate'
end

class ManageIQ::Providers::Azure::NetworkManager::SecurityGroup < ::SecurityGroup
end

Remove N+1 queries from NetworkManager list pages
Remove N+1 queries from NetworkManager list pages

N+1 was caused by STI inheritance of relations, for virtual
methods to work correctly, we need to hold the relations on a base
classes.

(transferred from ManageIQ/manageiq@4666d74f027dae965fbdab4d4ab713d0e2247979)
