0

I am using SQLite-Net-Extensions on C# within a WPF application. I have added a new property in my class "Foo":

[ForeignKey(typeof(Distributor))]
    public int DistributorId { get; set; }

    [ManyToOne(CascadeOperations = CascadeOperation.None)]
    public Distributor Distributor
    {
        get
        {
            return this.distributor;
        }
        set
        {
            if (this.distributor != value)
            {
                this.distributor = value;
                NotifyPropertyChanged("Distributor");
            }
        }
    }

When I Create the table:

_conn.CreateTable<Foo>();

Since the table already exists, it does not create the table but I would expect that this command adds the new column DistributorId. Is there any way to force that?

chincheta73
  • 187
  • 1
  • 22
  • `CreateTable` is a SQLite-Net method (not strictly related to sqlite-net-extensions), so it depends on the SQLite-Net version that you are using, but looks related to this bug: https://github.com/oysteinkrog/SQLite.Net-PCL/issues/36 – redent84 Oct 11 '18 at 11:23
  • Yes... it looks related to that bug. Is there any workaround? Thanks – chincheta73 Oct 11 '18 at 15:24

0 Answers0