"Potential illegal fragment detected" with GUID as search-key in AutoQuery

Version: 4.0.41.0 - MS SQL Server

If I use AutoQuery with GUID as a field type I get this Exception:

An exception of type ‘System.ArgumentException’ occurred in ServiceStack.OrmLite.dll but was not handled in user code

Additional information: Potential illegal fragment detected: "Customer"."Id" = CAST('07dae5cc-f3e4-45fd-a11d-c062c24437fa' AS UNIQUEIDENTIFIER)

CAST is the reason - if I remove CAST from IllegalSqlFragmentTokens it works fine.

Request:

public class MyRequest : QueryBase, IQuery<MyEntity, MyModel>, IReturn<MyResponse>
{
	public Guid? Id { get; set; }
}

Service:

public MyResponse Get(MyRequest request)
{
    var model = new MyResponse();

    var aq = AutoQuery.CreateQuery(request, Request.GetRequestParams());
    var result = AutoQuery.Execute(request, aq);

    model.Query = result;
    return model;
}

Did I miss something?

This should now be resolved with this commit that just finished deploying to MyGet.

Since you’ve already got v4.0.41 installed you’ll need to clear your NuGet cache to ensure the latest version gets downloaded.

Thx - awesome! …