text: ﻿
  
  CREATE View reference.RepoObject_reference_persistence
  As
  --
  Select
      --
      referenced_RepoObject_guid  = rop.source_RepoObject_guid
    , referencing_RepoObject_guid = rop.target_RepoObject_guid
    , referenced_entity_name      = ro_s.SysObject_name
    , referenced_fullname         = ro_s.RepoObject_fullname
    , referenced_id               = ro_s.SysObject_id
    --, referenced_node_id          = ro_s.node_id
    , referenced_schema_name      = ro_s.SysObject_schema_name
    , referenced_type             = ro_s.SysObject_type
    , referencing_entity_name     = ro_t.SysObject_name
    , referencing_fullname        = ro_t.RepoObject_fullname
    , referencing_id              = ro_t.SysObject_id
    --, referencing_node_id         = ro_t.node_id
    , referencing_schema_name     = ro_t.SysObject_schema_name
    , referencing_type            = Coalesce ( ro_t.SysObject_type, ro_t.RepoObject_type, 'U' )
    , InformationSource           = 'repo.RepoObject_persistence'
  From
      repo.RepoObject_persistence As rop
      Inner Join
          repo.RepoObject         As ro_t
              On
              ro_t.RepoObject_guid = rop.target_RepoObject_guid
  
      Inner Join
          repo.RepoObject         As ro_s
              On
              ro_s.RepoObject_guid = rop.source_RepoObject_guid
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObject_guid'
    , @value = 'f38f291c-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd2f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referencing_type';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd3f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referencing_schema_name';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd0f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referencing_RepoObject_guid';
  Go
  
  
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'ccf17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referencing_id';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd4f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referencing_entity_name';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd7f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referenced_type';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd5f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referenced_schema_name';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd1f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referenced_RepoObject_guid';
  Go
  
  
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'cef17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referenced_id';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd6f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referenced_entity_name';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = 'd8f17926-9d61-eb11-84dc-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'InformationSource';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = '10df2fe1-ae7a-eb11-84e5-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referencing_fullname';
  Go
  
  Execute sp_addextendedproperty
      @name = N'RepoObjectColumn_guid'
    , @value = '0fdf2fe1-ae7a-eb11-84e5-a81e8446d5b0'
    , @level0type = N'SCHEMA'
    , @level0name = N'reference'
    , @level1type = N'VIEW'
    , @level1name = N'RepoObject_reference_persistence'
    , @level2type = N'COLUMN'
    , @level2name = N'referenced_fullname';
  Go
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_schema_name]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referencing_schema_name';
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject_persistence].[target_RepoObject_guid]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referencing_RepoObject_guid';
  
  
  Go
  
  
  Go
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_id]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referencing_id';
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_name]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referencing_entity_name';
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_type]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referenced_type';
  
  
  Go
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_schema_name]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referenced_schema_name';
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject_persistence].[source_RepoObject_guid]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referenced_RepoObject_guid';
  
  
  Go
  
  
  Go
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_id]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referenced_id';
  
  
  Go
  
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[SysObject_name]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referenced_entity_name';
  
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectList', @value = N'* [repo].[RepoObject]
  * [repo].[RepoObject_persistence]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'pk_IndexPatternColumnName', @value = N'referenced_RepoObject_guid,referencing_RepoObject_guid', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'pk_IndexPatternColumnDatatype', @value = N'uniqueidentifier,uniqueidentifier', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'pk_index_guid', @value = N'E04C7C3C-0D96-EB11-84F4-A81E8446D5B0', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'AntoraReferencingList', @value = N'* xref:reference.RepoObject_reference_union.adoc[]
  * xref:repo.usp_main.adoc[]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'AntoraReferencedList', @value = N'* xref:repo.RepoObject.adoc[]
  * xref:repo.RepoObject_persistence.adoc[]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[RepoObject_fullname]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referencing_fullname';
  
  
  GO
  
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'ReferencedObjectColumnList', @value = N'* [repo].[RepoObject].[RepoObject_fullname]', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence', @level2type = N'COLUMN', @level2name = N'referenced_fullname';
  
  
  GO
  
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'is_ssas', @value = N'0', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  
  GO
  EXECUTE sp_addextendedproperty @name = N'is_repo_managed', @value = N'0', @level0type = N'SCHEMA', @level0name = N'reference', @level1type = N'VIEW', @level1name = N'RepoObject_reference_persistence';
  
  