DO 5.0.13

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);

        Domain.Build(dc);
    }
}

[HierarchyRoot(InheritanceSchema.ConcreteTable)]
public class EntBase : Entity
{
    [Field, Key]
    public Guid Id { get; set; }

    [Field(DefaultValue = OneTwo.One)] //SQL set default as 'string', but column 'numeric'
    public OneTwo Num { get; set; }
}

public class EntDerived : EntBase
{
}

public enum OneTwo
{
    One = 1,
    Two = 2,
}

asked Sep 05 at 05:12

Gushchin%20Anton's gravatar image

Gushchin Anton
7269


One Answer:

Hello Anton

We fixed it in developing branch. The fix will be included to one of upcoming versions.

answered Sep 19 at 05:11

Alexey%20Kulakov's gravatar image

Alexey Kulakov
52715

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA