Mapping string in db to List<string> in Dto splits on both commas and spaces

ServiceStack.OrmLite.PostgreSql version 5.5.1

This is my database model:

public class Spot : IHasId<int>
  {
    [AutoIncrement]
    public int Id { get; set; }
    [Alias("Nickname")]
    public string NickNames { get; set; }
    
  }

And this is my Dto:

public class Spot : IHasId<int>
  {
    public int Id { get; set; }
    public List<string> NickNames { get; set; }
    
  }

Given a value in NickNames of “Canyon, Canones, Vijfvingerig rif” I am trying out two scenarios:

Select from db model and use ConvertTo

 var x = db.SingleById<Db.Spot>(1493).ConvertTo<ServiceModel.DTO.Spot>();

this results in the expected result (3 items):

However when I use the following method:

var y = db.Select<ServiceModel.DTO.Spot>(db.From<Db.Spot>().Where(a => a.Id == 1493)).FirstOrDefault();

This results in 4 items. It seems that the values are splitted using not only a comma, but also the space.

I really need the behaviour of the first scenario. How can I achieve this?

Don’t try to read the field in a different model than what it was created as, so change your NickNames data model to a List<string> so it’s blobbed,