diff --git a/lib/xos-genx/tests/optimize_test.py b/lib/xos-genx/tests/optimize_test.py
index af40575..0d2c1b1 100644
--- a/lib/xos-genx/tests/optimize_test.py
+++ b/lib/xos-genx/tests/optimize_test.py
@@ -1,6 +1,5 @@
 import unittest
 from xosgenx.jinja2_extensions.fol2 import FOL2Python
-import vimpdb
 
 class XProtoOptimizeTest(unittest.TestCase):
     def setUp(self):
diff --git a/lib/xos-genx/tests/translator_test.py b/lib/xos-genx/tests/translator_test.py
index e82af6d..fad4dba 100644
--- a/lib/xos-genx/tests/translator_test.py
+++ b/lib/xos-genx/tests/translator_test.py
@@ -228,6 +228,33 @@
         output = XOSGenerator.generate(args)
         self.assertNotIn('default:', output)
 
+    def test_one_to_many_in_modeldef(self):
+        xproto = \
+"""
+option app_label = "test";
+
+message ServiceDependency {
+    required manytoone provider_service->Service:provided_dependencies = 1;
+    required manytoone subscriber_service->Service:subscribed_dependencies = 2;
+}
+
+message Service {
+    required string name = 1;
+}
+"""
+
+        args = FakeArgs()
+        args.inputs = xproto
+        args.target = 'modeldefs.xtarget'
+        output = XOSGenerator.generate(args)
+        # Service deps model
+        self.assertIn('{model: Service, type: manytoone, on_field: provider_service}', output)
+        self.assertIn('{model: Service, type: manytoone, on_field: provider_service}', output)
+
+        # Service model
+        self.assertIn('{model: ServiceDependency, type: onetomany, on_field: provider_service}', output)
+        self.assertIn('{model: ServiceDependency, type: onetomany, on_field: provider_service}', output)
+
 if __name__ == '__main__':
     unittest.main()
 
diff --git a/lib/xos-genx/xosgenx/jinja2_extensions/base.py b/lib/xos-genx/xosgenx/jinja2_extensions/base.py
index 3cb9886..40afa48 100644
--- a/lib/xos-genx/xosgenx/jinja2_extensions/base.py
+++ b/lib/xos-genx/xosgenx/jinja2_extensions/base.py
@@ -49,22 +49,6 @@
 
     return plural
 
-def xproto_links_to_modeldef_relations(llst):
-    outlist = []
-    seen = []
-    for l in llst:
-        try:
-            t = l['link_type']
-        except KeyError, e:
-            raise e
-
-        if l['peer']['fqn'] not in seen and t!='manytomany':
-            outlist.append('- {model: %s, type: %s}\n'%(l['peer']['name'], l['link_type']))
-        seen.append(l['peer'])
-    
-    return outlist
-
-
 def xproto_base_def(model_name, base, suffix='', suffix_list=[]):
     if (model_name=='XOSBase'):
         return '(models.Model, PlModelMixIn)'
diff --git a/lib/xos-genx/xosgenx/jinja2_extensions/gui.py b/lib/xos-genx/xosgenx/jinja2_extensions/gui.py
index bd23fdb..25342d2 100644
--- a/lib/xos-genx/xosgenx/jinja2_extensions/gui.py
+++ b/lib/xos-genx/xosgenx/jinja2_extensions/gui.py
@@ -87,4 +87,25 @@
         val = 'null'
     else:
         val = str(default)
-    return val
\ No newline at end of file
+    return val
+
+
+def xproto_links_to_modeldef_relations(llst):
+    outlist = []
+    seen = []
+    for l in llst:
+        try:
+            t = l['link_type']
+        except KeyError, e:
+            raise e
+
+        if l['peer']['fqn'] not in seen and t != 'manytomany':
+            on_field = 'null'
+            if l['link_type'] == 'manytoone':
+                on_field = l['src_port']
+            elif l['link_type'] == 'onetomany':
+                on_field = l['dst_port']
+            outlist.append('- {model: %s, type: %s, on_field: %s}\n' % (l['peer']['name'], l['link_type'], on_field))
+        seen.append(l['peer'])
+
+    return outlist
\ No newline at end of file
diff --git a/lib/xos-genx/xosgenx/targets/modeldefs.xtarget b/lib/xos-genx/xosgenx/targets/modeldefs.xtarget
index 366f2ee..ec8df1c 100644
--- a/lib/xos-genx/xosgenx/targets/modeldefs.xtarget
+++ b/lib/xos-genx/xosgenx/targets/modeldefs.xtarget
@@ -35,7 +35,7 @@
   {% endif -%}
   {% endfor %}
   name: {{ m.name }}
-  {%- set goodlinks = xproto_links_to_modeldef_relations( xproto_base_links(m, proto.message_table) + m.links ) %}
+  {%- set goodlinks = xproto_links_to_modeldef_relations( xproto_base_links(m, proto.message_table) + m.links ) + xproto_links_to_modeldef_relations( xproto_base_rlinks(m, proto.message_table) + m.rlinks )%}
   {% if goodlinks %}
   relations:
   {{ goodlinks | join('\n') | indent(width=2)}}
