views:

11

answers:

0

I have a List that I am trying to get into the DB and am coming up with the following assert:

{"ORA-12899: value too large for column \"GDATA\".\"CNVTOOLBOX\".\"TOOL\" (actual: 387, maximum: 255)\n"}

I am overriding the automapping with the following:

public class CnvRootMap : IAutoMappingOverride<CnvRoot>
{
    public void Override(AutoMapping<CnvRoot> mapping)
    {
        mapping.Id(x => x.Id, "CnvRootID");

        mapping.HasMany(x => x.Toolbox)
           .AsBag()
           .Table("CnvToolbox")
           .Element("Tool", m => m.Type<string>());
    }
}

I'm sure that I am missing something simple, but is there a way to designate the .Length for the column like you can with for example mapping.Map(x => x.StateLog).Length(2000); ?

Thanks in advance

EDIT

Using the following Convention I am able to change all strings to have a bigger .Length, however this does not seem to affect types of IList<string>.

public class DefaultStringLengthConvention : IPropertyConvention
{
    public void Apply(IPropertyInstance instance)
    {
        instance.Length(2000);
    }
}

Anyone aware of an example that might help going the Convention route?

related questions