SimpleRepository and booleans with SubSonic

subsonic

I am trying to add a boolean column in SubSonic 3.0.0.3 and without this column the code works fine but as soon as I had a bool variable into my model this fails with the following error:

The name "False" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.

Anyonw know if this should be supported and if it is what I may be doing wrong:

Data Object Class:

public class Desk
{
    [SubSonicPrimaryKey]
    public int DeskId { get; set; }

    public string DeskName { get; set; }

    public string SAPCode { get; set; }

    public int LocationId { get; set; }

    public bool Active { get; set; }

}

Use of Class:

var d = new Desk();
            d.DeskName = "Test";
            d.SAPCode = "12345";
            d.LocationId = 2;
            d.Active = true;

            var repository = new SimpleRepository("SubSonicTesting", SimpleRepositoryOptions.RunMigrations);
            repository.Add(d);

Best Answer

I have faced the exact same issue (version 3.0.0.3) when I added a bool property named "IsAccountOwner". The problem seems to be with migrations because when I deleted the table, SubSonic re-created it correctly with the added column.

I'm using SQL Server 2008 Express, in case that matters. The error is related to a malformed query perhaps?