Class TreeModeler
Use this to take imported data from elsewhere which is a table but would have a tree-like structure (folders, etc.). Tell it where/how the relationships are mapped, and it will create Entities that have navigable relationships for this.
Implements
Inherited Members
Namespace: ToSic.Eav.DataSources
Assembly: ToSic.Eav.DataSources.dll
Syntax
[VisualQuery(NameId = "58cfcbd6-e2ae-40f7-9acf-ac8d758adff9", NiceName = "Relationship/Tree Modeler", UiHint = "Connect items to create relationships or trees", Icon = "account_tree", NameIds = new string[] { "58cfcbd6-e2ae-40f7-9acf-ac8d758adff9", "ToSic.Eav.DataSources.TreeBuilder, ToSic.Eav.DataSources.SharePoint" }, Type = DataSourceType.Modify, ConfigurationType = "d167054a-fe0f-4e98-b1f1-0a9990873e86", In = new string[] { "Default*" }, HelpLink = "https://go.2sxc.org/DsTreeModeler")]
[PublicApi("Brand new in v11.20, WIP, may still change a bit")]
public sealed class TreeModeler : DataSourceBase, IDataSource, IAppIdentity, IZoneIdentity, IAppIdentityLight, ICacheKey, ICacheExpiring, ITimestamped, IHasLog, IDataSourceLinkable
Remarks
- New in v11.20
- Changed in v15.05 to use the immutable convention
- note that the above change is actually a breaking change, but since this is such an advanced DataSource, we assume it's not used in dynamic code.
Properties
| Improve this Doc View SourceIdentifier
This determines what property is used as ID on the parent. Currently only allows "EntityId" and "EntityGuid"
Declaration
[Configuration(Field = "ParentIdentifierAttribute", Fallback = "entityid")]
public string Identifier { get; }
Property Value
Type | Description |
---|---|
string |
NewChildrenField
The name of the new field on the parent, which will reference the children
Declaration
[Configuration(Field = "TargetChildrenAttribute", Fallback = "Children")]
public string NewChildrenField { get; }
Property Value
Type | Description |
---|---|
string |
NewParentField
Name of the new field on a child, which will reference the parent.
Declaration
[Configuration(Field = "TargetParentAttribute", Fallback = "Parent")]
public string NewParentField { get; }
Property Value
Type | Description |
---|---|
string |
ParentReferenceField
The property on a child which contains the parent ID
Declaration
[Configuration(Field = "ChildParentAttribute", Fallback = "ParentId")]
public string ParentReferenceField { get; }
Property Value
Type | Description |
---|---|
string |