diff --git a/lib/NGCP/Schema/Result/voip_peer_hosts.pm b/lib/NGCP/Schema/Result/voip_peer_hosts.pm
index 859b3eb8..50ad409b 100644
--- a/lib/NGCP/Schema/Result/voip_peer_hosts.pm
+++ b/lib/NGCP/Schema/Result/voip_peer_hosts.pm
@@ -70,7 +70,7 @@ __PACKAGE__->has_many(
 __PACKAGE__->might_have(
   "lcr_gw",
   "NGCP::Schema::Result::lcr_gw",
-  { "foreign.flags" => "self.id" },
+  { "foreign.id" => "self.id" },
 );
 
 sub TO_JSON {