Is it possible to map relationships to classes? Here are my Models:
public class Word
{
[PrimaryKey] [AutoIncrement] public int id { get; set; }
public string normal_form { get; set; }
public IList<Word_Orth> variants { get; set; }
}
public class Word_Orth
{
[PrimaryKey] [AutoIncrement] public int id { get; set; }
public int word_id { get; set; }
public string orthogonal_form { get; set; }
}
One word can have many orthogonal forms. I want to be able to fetch words together with their orthogonal forms in a list. Is this possible?
My current query is SELECT * from Word inner join Word_Orth on Word_Orth.word_id == Word.id but it fetches multiple instances of Word and null in variants.
Is it possible to map relationships to classes? Here are my Models:
One word can have many orthogonal forms. I want to be able to fetch words together with their orthogonal forms in a list. Is this possible?
My current query is
SELECT * from Word inner join Word_Orth on Word_Orth.word_id == Word.id
but it fetches multiple instances of Word andnull
in variants.