diff --git a/xos/xos_client/xosapi/fake_stub.py b/xos/xos_client/xosapi/fake_stub.py
index 36af58b..7e57f5e 100644
--- a/xos/xos_client/xosapi/fake_stub.py
+++ b/xos/xos_client/xosapi/fake_stub.py
@@ -24,6 +24,8 @@
 ContentTypeMap = {}
 
 class FakeObj(object):
+    BASES=[]
+
     def __init__(self, fields=[], **kwargs):
         super(FakeObj, self).__setattr__("is_set", {})
         super(FakeObj, self).__setattr__("fields", [])
@@ -114,10 +116,22 @@
 
         return fbn
 
+class User(FakeObj):
+    FIELDS = ( {"name": "id", "default": 0},
+               {"name": "email", "default": ""},
+               {"name": "site_id", "default": 0, "fk_model": "Site"}, )
+
+    def __init__(self, **kwargs):
+        return super(User, self).__init__(self.FIELDS, **kwargs)
+
+    DESCRIPTOR = FakeDescriptor("User")
+
 class Slice(FakeObj):
     FIELDS = ( {"name": "id", "default": 0},
                {"name": "name", "default": ""},
-               {"name": "site_id", "default": 0, "fk_model": "Site"} )
+               {"name": "site_id", "default": 0, "fk_model": "Site"},
+               {"name": "creator_id", "default": 0, "fk_model": "User"},
+               {"name": "leaf_model_name", "default": "Slice"} )
 
     def __init__(self, **kwargs):
         return super(Slice, self).__init__(self.FIELDS, **kwargs)
@@ -127,7 +141,8 @@
 class Site(FakeObj):
     FIELDS = ( {"name": "id", "default": 0},
                {"name": "name", "default": ""},
-               {"name": "slice_ids", "default": 0, "fk_reverse": "Slice"} )
+               {"name": "slice_ids", "default": 0, "fk_reverse": "Slice"},
+               {"name": "leaf_model_name", "default": "Site"})
 
     def __init__(self, **kwargs):
         return super(Site, self).__init__(self.FIELDS, **kwargs)
@@ -136,13 +151,26 @@
 
 class Service(FakeObj):
     FIELDS = ( {"name": "id", "default": 0},
-               {"name": "name", "default": ""}, )
+               {"name": "name", "default": ""},
+               {"name": "leaf_model_name", "default": "Service"})
 
     def __init__(self, **kwargs):
         return super(Service, self).__init__(self.FIELDS, **kwargs)
 
     DESCRIPTOR = FakeDescriptor("Service")
 
+class ONOSService(FakeObj):
+    FIELDS = ( {"name": "id", "default": 0},
+               {"name": "name", "default": ""},
+               {"name": "leaf_model_name", "default": "ONOSService"})
+
+    BASES = ["Service"]
+
+    def __init__(self, **kwargs):
+        return super(ONOSService, self).__init__(self.FIELDS, **kwargs)
+
+    DESCRIPTOR = FakeDescriptor("ONOSService")
+
 class Tag(FakeObj):
     FIELDS = ( {"name": "id", "default": 0},
                {"name": "service_id", "default": None},
@@ -150,7 +178,8 @@
                {"name": "value", "default": ""},
                {"name": "content_type", "default": None},
                {"name": "object_id", "default": None},
-               {"name": "slice_ids", "default": 0, "fk_reverse": "Slice"} )
+               {"name": "slice_ids", "default": 0, "fk_reverse": "Slice"},
+               {"name": "leaf_model_name", "default": "Tag"})
 
     def __init__(self, **kwargs):
         return super(Tag, self).__init__(self.FIELDS, **kwargs)
@@ -168,7 +197,7 @@
     def __init__(self):
         self.id_counter = 1
         self.objs = {}
-        for name in ["Slice", "Site", "Tag", "Service"]:
+        for name in ["Slice", "Site", "Tag", "Service", "ONOSService", "User"]:
             setattr(self, "Get%s" % name, functools.partial(self.get, name))
             setattr(self, "List%s" % name, functools.partial(self.list, name))
             setattr(self, "Create%s" % name, functools.partial(self.create, name))
@@ -196,6 +225,13 @@
         self.id_counter = self.id_counter + 1
         k = self.make_key(classname, FakeObj(id=obj.id))
         self.objs[k] = obj
+
+        for base_classname in obj.BASES:
+            base_class = globals()[base_classname]
+            base_obj = base_class(id=obj.id, leaf_model_name = classname)
+            k = self.make_key(base_classname, base_obj)
+            self.objs[k] = base_obj
+
         return obj
 
     def update(self, classname, obj, metadata=None):
@@ -211,7 +247,7 @@
 class FakeSymDb(object):
     def __init__(self):
         self._classes = {}
-        for name in ["Slice", "Site", "ID", "Tag", "Service"]:
+        for name in ["Slice", "Site", "ID", "Tag", "Service", "ONOSService", "User"]:
             self._classes["xos.%s" % name] = globals()[name]
 
 
diff --git a/xos/xos_client/xosapi/orm.py b/xos/xos_client/xosapi/orm.py
index 3bd76ea..202ecd8 100644
--- a/xos/xos_client/xosapi/orm.py
+++ b/xos/xos_client/xosapi/orm.py
@@ -247,6 +247,15 @@
         return d
 
     @property
+    def leaf_model(self):
+        # Easy case - this model is already the leaf
+        if self.leaf_model_name == self._wrapped_class.__class__.__name__:
+            return self
+
+        # This model is not the leaf, so use the stub to fetch the leaf model
+        return getattr(self.stub, self.leaf_model_name).objects.get(id=self.id)
+
+    @property
     def model_name(self):
         return self._wrapped_class.__class__.__name__
 
diff --git a/xos/xos_client/xosapi/orm_test.py b/xos/xos_client/xosapi/orm_test.py
index 23cba6d..61d37b9 100644
--- a/xos/xos_client/xosapi/orm_test.py
+++ b/xos/xos_client/xosapi/orm_test.py
@@ -15,7 +15,9 @@
 
 
 import exceptions
+import random
 import shutil
+import string
 import sys
 import unittest
 
@@ -25,6 +27,7 @@
 if "-R" in sys.argv:
     USE_FAKE_STUB = False
     sys.argv.remove("-R")
+    # Note: will leave lots of litter (users, sites, etc) behind in the database
 else:
     USE_FAKE_STUB = True
 
@@ -124,7 +127,10 @@
         site = orm.Site(name="mysite")
         site.save()
         self.assertTrue(site.id > 0)
-        slice = orm.Slice(name="mysite_foo", site_id = site.id)
+        user = orm.User(email="fake_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10)), site_id=site.id)
+        user.save()
+        self.assertTrue(user.id > 0)
+        slice = orm.Slice(name="mysite_foo", site_id = site.id, creator_id = user.id)
         slice.save()
         self.assertTrue(slice.id > 0)
         self.assertNotEqual(slice.site, None)
@@ -135,7 +141,10 @@
         site = orm.Site(name="mysite")
         site.save()
         self.assertTrue(site.id > 0)
-        slice = orm.Slice(name="mysite_foo", site = site)
+        user = orm.User(email="fake_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10)), site_id=site.id)
+        user.save()
+        self.assertTrue(user.id > 0)
+        slice = orm.Slice(name="mysite_foo", site = site, creator_id=user.id)
         slice.save()
         slice.invalidate_cache()
         self.assertTrue(slice.id > 0)
@@ -147,7 +156,10 @@
         site = orm.Site(name="mysite")
         site.save()
         self.assertTrue(site.id > 0)
-        slice = orm.Slice(name="mysite_foo", site = site, service=None)
+        user = orm.User(email="fake_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10)), site_id=site.id)
+        user.save()
+        self.assertTrue(user.id > 0)
+        slice = orm.Slice(name="mysite_foo", site = site, service=None, creator_id=user.id)
         slice.save()
         slice.invalidate_cache()
         self.assertTrue(slice.id > 0)
@@ -158,11 +170,14 @@
         site = orm.Site(name="mysite")
         site.save()
         self.assertTrue(site.id > 0)
+        user = orm.User(email="fake_" + ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10)), site_id=site.id)
+        user.save()
+        self.assertTrue(user.id > 0)
         service = orm.Service(name="myservice")
         service.save()
         self.assertTrue(service.id > 0)
         # start out slice.service is non-None
-        slice = orm.Slice(name="mysite_foo", site = site, service=service)
+        slice = orm.Slice(name="mysite_foo", site = site, service=service, creator_id=user.id)
         slice.save()
         slice.invalidate_cache()
         self.assertTrue(slice.id > 0)
@@ -205,6 +220,31 @@
         self.assertNotEqual(tag.content_object, None)
         self.assertEqual(tag.content_object.id, site.id)
 
+    def test_leaf_model_trivial(self):
+        orm = self.make_coreapi()
+        service = orm.Service(name="myservice")
+        service.save()
+        self.assertEqual(service.leaf_model_name, "Service")
+
+    def test_leaf_model_descendant(self):
+        orm = self.make_coreapi()
+        onos_service = orm.ONOSService(name="myservice")
+        onos_service.save()
+        self.assertEqual(onos_service.model_name, "ONOSService")
+        self.assertEqual(onos_service.leaf_model_name, "ONOSService")
+
+        service = orm.Service.objects.get(id=onos_service.id)
+        self.assertEqual(service.id, onos_service.id)
+        self.assertEqual(service.model_name, "Service")
+        self.assertEqual(service.leaf_model_name, "ONOSService")
+
+        onos_service_cast = service.leaf_model
+        self.assertEqual(onos_service_cast.model_name, "ONOSService")
+        self.assertEqual(onos_service_cast.leaf_model_name, "ONOSService")
+        self.assertEqual(onos_service_cast.id, onos_service.id)
+
+
+
 if USE_FAKE_STUB:
     sys.path.append("..")
 
