Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Carl Sjöholm 29 posts 220 karma points
    May 07, 2021 @ 10:19
    Carl Sjöholm

    Umbraco Custom Table Relations

    Hi. I'm trying to create relationships between custom tables.

    Using the [Reference]-attribute as described here.

    But get this exception:

    System.InvalidOperationException: Sequence contains no matching element at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate) at Umbraco.Core.Persistence.SqlSyntax.SqlSyntaxProviderBase1.FormatType(ColumnDefinition column) at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.String.Join(String separator, IEnumerable1 values) at Umbraco.Core.Persistence.SqlSyntax.SqlSyntaxProviderBase1.Format(IEnumerable1 columns) at Umbraco.Core.Persistence.SqlSyntax.SqlSyntaxProviderBase`1.Format(TableDefinition table) at Umbraco.Core.Migrations.Expressions.Create.Table.CreateTableOfDtoBuilder.Do() at xxx.Core.Migrations.InitialSetup.Migrate() in

    I have a simple table layout

    Association > Section

     [Reference(ReferenceType.Many, ColumnName = nameof(AssociationId), ReferenceMemberName = nameof(AssociationId))]
     public List<Section> Sections { get; set; }


Please Sign in or register to post replies

Write your reply to: