Class TreeModeler
- Namespace
- ToSic.Eav.DataSources
- Assembly
- ToSic.Eav.DataSources.dll
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.
[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
- Inheritance
-
TreeModeler
- Implements
- Inherited Members
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
Identifier
This determines what property is used as ID on the parent. Currently only allows "EntityId" and "EntityGuid"
[Configuration(Field = "ParentIdentifierAttribute", Fallback = "entityid")]
public string Identifier { get; }
Property Value
NewChildrenField
The name of the new field on the parent, which will reference the children
[Configuration(Field = "TargetChildrenAttribute", Fallback = "Children")]
public string NewChildrenField { get; }
Property Value
NewParentField
Name of the new field on a child, which will reference the parent.
[Configuration(Field = "TargetParentAttribute", Fallback = "Parent")]
public string NewParentField { get; }
Property Value
ParentReferenceField
The property on a child which contains the parent ID
[Configuration(Field = "ChildParentAttribute", Fallback = "ParentId")]
public string ParentReferenceField { get; }