The phone numbers are blobbed. Is there anything I can do with that blobbed data in a query?
I tried this:
var test = db.From<Player>().Where(x => x.PhoneNumbers.Any(p => p.Kind == PhoneKind.Mobile));
var lookup = db.Select(test);
To see if it returned data but it gave me this error:
System.InvalidOperationException: 'variable 'x' of type 'OrmLiteTest.Player' referenced from scope '', but it is not defined'
I also tried this but with same error:
var test = db.From<Player>().Where(x => x.PhoneNumbers.Contains(new Phone { Kind = PhoneKind.Mobile }));
I looked through documentation but couldn’t see any examples of querying blobbed data. Is it possible? What can be done with it apart from serializing a list of a specific record?
No, the Query Expression needs to be converted to SQL that’s run on the RDBMS which isn’t possible with blobbed fields. You can only query the returned results where you can will be able to use LINQ on the generic collections.
I haven’t worked with blobbed data before but I assume I could search for a string inside the data as that is possible in SQL. Would I have to write the SQL for that of can I do with a LINQ expression?