def get(self, pk):
        """
        Returns the object for the key
        Override it for efficiency.
        """
        for item in self.store.get(self.query_class):
            # coverts pk value to correct type
            pk = item.properties[item.pk].col_type(pk)
            if getattr(item, item.pk) == pk:
                return item

        Returns the object for the key
        Override it for efficiency.
        
flask_appbuilder/models/generic/__init__.py