Skip to content

Could not create relation on One-To-One #19

Description

@Xellios
  [Table.Name("B")]
    public class B
    {
        [Column.Size(100)]
        public string Class { get; set; }
        [Relation.OneToOne(LocalKey ="Id", ForeignKey ="Id")]
        public Drawing Drawing { get; set; }
    }
    [Table.Name("A")]
    public class A
    {
        [Column.PrimaryKey(AutoIncrement = false)]
        public Guid Id;
        [Column.Size(100)]
        public string MainNumber;
    }

This throws Iridium.DB.SchemaException: 'Could not create relation B.A', they both share the same name and value for the uniqueidentifier (primary key)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions