public LightSpeedColumnProvider(LightSpeedTableProvider tableProvider, PropertyInfo property)
        {
            Name = property.Name;
            EntityTypeProperty = property;
            ColumnType = property.PropertyType;
            IsPrimaryKey = (property.Name == "Id"); //TODO: add support for composite keys
            IsGenerated = IsPrimaryKey || LightSpeedSpecialProperties.Contains(property.Name);
            IsCustomProperty = LightSpeedSpecialProperties.Contains(property.Name);
            IsSortable = !IsAssociationType(property.PropertyType);
            IsExcluded = LightSpeedExcludeProperties.Contains(property.Name);
            Table = tableProvider;

            InitialiseMaxLength();
        }
 /// <summary>
 /// Constructor that takes the metadata context, a metadata type and a parent custom type descriptor
 /// </summary>
 /// <param name="typeDescriptionContext"></param>
 /// <param name="metaType"></param>
 /// <param name="parent"></param>
 public LightSpeedTypeDescriptor(LightSpeedTypeDescriptionContext typeDescriptionContext, LightSpeedTableProvider metaTable, ICustomTypeDescriptor parent)
     : base(parent)
 {
     this._typeDescriptionContext = typeDescriptionContext;
     this._metaTable = metaTable;
 }
 public LightSpeedOneToOneIdAssociationProvider(LightSpeedColumnProvider fromColumn, LightSpeedTableProvider toTable, LightSpeedColumnProvider toColumn)
     : base(fromColumn, toTable, toColumn)
 {
     Direction = AssociationDirection.OneToOne;
     ThisKey  = ForeignKeyNames = toColumn.Association.ForeignKeyNames;
     OtherKey = new List<string> { "Id" };
 }
 public LightSpeedOneIdToOneAssociationProvider(LightSpeedColumnProvider fromColumn, LightSpeedTableProvider toTable, LightSpeedColumnProvider toColumn, List<string> foreignKeyNames)
     : base(fromColumn, toTable, toColumn)
 {
     Direction = AssociationDirection.OneToOne;
     ForeignKeyNames = foreignKeyNames.AsReadOnly();
     OtherKey = ForeignKeyNames;
     ThisKey = new List<string> { "Id" };
     IsForeignKey = true;
 }
 protected LightSpeedAssociationProvider(LightSpeedColumnProvider fromColumn, LightSpeedTableProvider toTable, LightSpeedColumnProvider toColumn)
 {
     if(fromColumn == null)
         throw new Exception("fromColumn must not be null in association");
     FromColumn = fromColumn;
     if (toTable == null)
         throw new Exception("toTable must not be null in association");
     ToTable = toTable;
     if (toColumn == null)
         throw new Exception("toColumn must not be null in association");
     ToColumn = toColumn;
     IsEagerLoaded = EagerLoad();
 }