Skip to content

[Ignore] stopped working? #1010

@stesvis

Description

@stesvis

I have a model set up like this, so I can store a whole json object as a string:

public class Truck
    {
        [PrimaryKey, AutoIncrement]
        [JsonProperty("id")]
        public int Id { get; set; }

        public string Json { get; set; }

        [Ignore]
        public TruckDTO TruckDTO
        {
            get { return Json == null ? null : JsonConvert.DeserializeObject<TruckDTO>(Json); }
            set { Json = JsonConvert.SerializeObject(value); }
        }
    }

The problem is that when I call CreateTableAsync<Truck>() I get a NotSupportedException:

"Don't know about LiveDispatch.Mobile.DTOs.TruckDTO"

By using [Ignore] it should not try to create a column of a not supported type such as TruckDTO, but it doesn't look like it's working.

Any idea?

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