title: How to: Nested Lists in SQLite-Net Extensions
body: <p><strong>How to: Do nested lists in sqlite-net-extensions</strong><br>
  Answer Found: Keeping the question as an example of how to do it.<br>
  The problem i encountered was not sqlite-net-extensions related, but i'm keeping the question for context.</p>
  
  <p><strong>[Old Question]</strong>
  <em>I've got a problem with TwinCoders SQLite-net extensions.<br>
  I'm trying to insert a Series object into my database:</em>  </p>
  
  <p><em>I'm using the <code>Db.InsertWithChildren(SelectedSeriesObject,recursive:true)</code> method.<br>
  The Series object is added accordingly with it's attributes.<br>
  All the Episodes are added as well, no problems there.</em>  </p>
  
  <p><em>The problem is the BaseSeason.<br>
  It will only insert one Season object, which is (for some reason) the last Season Object of the list of Seasons in the Series</em></p>
  
  <pre><code>public class BaseSeries : BaseMedia
  {
  [PrimaryKey, AutoIncrement]
  public int Id { get; set; }
  
  [Indexed]
  public int ShowId { get; set; }
  
  public string FirstAirDate { get; set; }
  public string LastAirDate { get; set; }
  public string Status { get; set; }
  
  [OneToMany(CascadeOperations = CascadeOperation.All)]
  public List&lt;BaseSeason&gt; Seasons { get; set; }
  /// &lt;summary&gt;
  /// TvShow = 0, Anime = 1
  /// &lt;/summary&gt;
  public int SeriesType { get; set; }
  
  }
  
  public class BaseSeason
  {
  [PrimaryKey, AutoIncrement]
  public int Id { get; set; }
  
  [ForeignKey(typeof(BaseSeries))]
  public int SeasonId { get; set; }
  
  public int SeasonNumber { get; set; }
  public int NumberOfEpisodes { get; set; }
  public string Plot { get; set; }
  public string Poster { get; set; }
  public string AirDate { get; set; }
  
  [OneToMany(CascadeOperations = CascadeOperation.All)]
  public List&lt;BaseEpisode&gt; Episodes { get; set; }    
  [ManyToOne]
  public BaseSeries BaseSeries { get; set; }
  
  }
  
  public class BaseEpisode
  {
  [PrimaryKey, AutoIncrement]
  public int Id { get; set; }
  
  [ForeignKey(typeof(BaseSeason))]
  public int EpisodeId { get; set; }
  
  public string Title { get; set; }
  public string Plot { get; set; }
  public string Poster { get; set; } //still path
  public string AirDate { get; set; }
  public int EpisodeNumber { get; set; }
  public int SeasonNumber { get; set; }
  public string SeriesName { get; set; }    
  
  [ManyToOne]
  public BaseSeason BaseSeason { get; set; }
  }
  </code></pre>
  
  <p>Is there anyone with experience regarding nested relationships in sqlite-net-extensions that knows how to make this work or see what i did wrong?</p>
  
  <p><a href="https://i.stack.imgur.com/zYkWJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zYkWJ.png" alt="Intended Relation"></a>  </p>