Skip to content

Found an issue when using a base class with [Timestamp] attribute on it #21

Description

@ste4net

As i wrote in #20 I have likely identified the following issue:
Code is not generated correctly if a class with the [Partial] attribute inherits from a base class that uses the [Timestamp] attribute (System.ComponentModel.DataAnnotations).
This issue occurs only if the base class is located in a different assembly.
However, in the case of < EmitCompilerGeneratedFiles >true< /EmitCompilerGeneratedFiles >, the physical files are still generated correctly.

Case one (not working)...

//...[another assembly
    public class SImpleBase
    {
        [Timestamp]
        public byte[] RowVersion { get; set; } = new byte[8];
         
    }
 //...[another assembly
    [Partial]
    public class Prova : SImpleBase
    {
        public string Surname { get; set; }
        public string Name { get; set; }
    }

image

Case one (working)...

public class SImpleBase2
    {
        [Timestamp]
        public byte[] RowVersion { get; set; } = new byte[8];

    }
    [Partial]
    public class Prova : SImpleBase2
    {
        public string Surname { get; set; }
        public string Name { get; set; }
    }

image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions