Can I drop index on single interface implementation, if field was declared in interface? (same question for base type fields)
If can't, what do you think it is bug or not?
Example, after recreate in DB Ent and Ent2 has index
Program.Ent.Program.IEnt.FK_E1
Program.Ent2.Program.IEnt.FK_E1
namespace Sample
{
using System;
using Xtensive.Orm;
using Xtensive.Orm.Configuration;
internal class Program
{
private static void Main(string[] args)
{
var dc = new DomainConfiguration("sqlserver", "Data Source=.; Initial Catalog=DO40-Tests; Integrated Security=True;")
{
UpgradeMode = DomainUpgradeMode.Recreate
};
dc.Types.Register(typeof(Program).Assembly);
using (Domain.Build(dc))
{
}
}
public interface IEnt : IEntity
{
[Field]
Ent E1 { get; set; }
}
[HierarchyRoot]
public class Ent : Entity, IEnt
{
[Field, Key]
public Guid Id { get; set; }
[Field(Indexed = false)]
public Ent E1 { get; set; }
}
[HierarchyRoot]
public class Ent2 : Entity, IEnt
{
[Field, Key]
public Guid Id { get; set; }
public Ent E1 { get; set; }
}
}
}
asked
Oct 12 '17 at 08:40
Gushchin Anton
11●27●27●29