Error mapping Table Indexes

2 posts, 0 answers
  1. Mark McPherson
    Mark McPherson avatar
    5 posts
    Member since:
    Dec 2009

    Posted 22 Jul 2010 Link to this post

    When I add my Items table to the domain model I get the following errors:

    Error 2 The meta model contains more than one indexes with name ''Items'.IX_NDCNum' C:\VSTFS\VS2010\OpenAccess1\OpenAccess1\ContractEntityDiagrams.rlinq 0 0 
    Error 3 The meta model contains more than one indexes with name ''Items'.IX_LineRackShelfSlot' C:\VSTFS\VS2010\OpenAccess1\OpenAccess1\ContractEntityDiagrams.rlinq 0 0 
    Error 4 The meta model contains more than one indexes with name ''Items'.IX_LineRackShelfSlot' C:\VSTFS\VS2010\OpenAccess1\OpenAccess1\ContractEntityDiagrams.rlinq 0 0 
    Error 7 The column timestamp is specified as an autoincrement but it is not a primary key column. C:\VSTFS\VS2010\OpenAccess1\OpenAccess1\ContractEntityDiagrams.rlinq 0 0 

    The DDL for the Items table is:

    CREATE TABLE [dbo].[Items](
        [Status] [varchar](1) NULL,
        [ItemNum] [varchar](6) NOT NULL,
        [Category] [varchar](3) NULL,
        [VendorNum] [varchar](6) NULL,
        [Description] [varchar](26) NULL,
        [Size] [varchar](7) NULL,
        [MfrNum] [varchar](6) NULL,
        [RetailPrice] [money] NULL,
        [AWP] [money] NULL,
        [AWC] [money] NULL,
        [ActualCost] [money] NULL,
        [PriceChangeDt] [datetime] NULL,
        [CDMAWhseSell] [money] NULL,
        [FutRetailPrice] [money] NULL,
        [MfrDlStartDt] [datetime] NULL,
        [MfrDlEndDt] [datetime] NULL,
        [TUDlStartDt] [datetime] NULL,
        [TUDlEndDt] [datetime] NULL,
        [TUDlMinQty] [smallint] NULL,
        [NonBrandItemNum] [varchar](6) NULL,
        [MjrKey] [varchar](3) NULL,
        [GuaranteeAWP] [money] NULL,
        [GuaranteeFlag] [varchar](1) NULL,
        [BlueIceFlag] [varchar](1) NULL,
        [OnHand] [int] NULL,
        [CasePickArea] [varchar](2) NULL,
        [CasePickLoc] [int] NULL,
        [CasePickSlot] [smallint] NULL,
        [CasePickFacings] [smallint] NULL,
        [OutOfStockCode] [varchar](1) NULL,
        [MjrGuaranteeAWC] [money] NULL,
        [PurchaseListPct] [numeric](6, 5) NULL,
        [PurchaseCostPct] [numeric](6, 5) NULL,
        [LastReplenDt] [datetime] NULL,
        [LastSoldDt] [datetime] NULL,
        [MaxSchedShipQty] [smallint] NULL,
        [SchedDrugClass] [varchar](1) NULL,
        [DEAReportable] [varchar](1) NULL,
        [PriceCat] [smallint] NULL,
        [MfrShelfPack] [smallint] NULL,
        [KerrShipPack] [int] NULL,
        [KerrCasePack] [int] NULL,
        [UnitOfSale] [varchar](2) NULL,
        [NDCNum] [varchar](11) NULL,
        [MjrDlAWC] [money] NULL,
        [BrandItemNum] [varchar](6) NULL,
        [HazardousWaste] [varchar](1) NULL,
        [MjrFlag] [varchar](1) NULL,
        [DiscontinueDt] [datetime] NULL,
        [DDDReportable] [varchar](1) NULL,
        [InventoryReviewCode] [varchar](1) NULL,
        [TopSeller] [varchar](1) NULL,
        [NoPriceStickers] [varchar](1) NULL,
        [Liquid] [varchar](1) NULL,
        [StoreShelfLabels] [varchar](1) NULL,
        [ExcludeChain] [varchar](2) NULL,
        [Glass] [varchar](1) NULL,
        [AddDt] [datetime] NULL,
        [MjrGuaranteeDt] [datetime] NULL,
        [CubicInches] [numeric](7, 2) NULL,
        [FutActiveDt] [datetime] NULL,
        [OnOrder] [int] NULL,
        [FDARating] [varchar](2) NULL,
        [Weight] [numeric](5, 2) NULL,
        [ActDt] [datetime] NULL,
        [Facings] [varchar](1) NULL,
        [Capacity] [int] NULL,
        [MfrCasePack] [int] NULL,
        [AltCategory] [varchar](3) NULL,
        [Last4WeeksSold] [int] NULL,
        [Last6WeeksSold] [int] NULL,
        [Last8WeeksSold] [int] NULL,
        [Last52WeeksSold] [int] NULL,
        [MjrBuyer] [varchar](3) NULL,
        [LineNum] [varchar](3) NULL,
        [RackNum] [smallint] NULL,
        [ShelfNum] [varchar](1) NULL,
        [SlotNum] [varchar](1) NULL,
        [PickAreaOnHand] [int] NULL,
        [FutMfrDlQty] [smallint] NULL,
        [LastPODt] [datetime] NULL,
        [UPSShipment] [varchar](1) NULL,
        [ReturnDt] [datetime] NULL,
        [AdjustedDt] [datetime] NULL,
        [MjrPlan] [varchar](6) NULL,
        [ChgbkYesNo] [varchar](1) NULL,
        [Aerosol] [varchar](1) NULL,
        [CDMASell] [money] NULL,
        [WholesalerSell] [money] NULL,
        [MjrDlStartDt] [datetime] NULL,
        [MjrDlEndDt] [datetime] NULL,
        [BackOrder] [int] NULL,
        [SecOnOrder] [int] NULL,
        [SecOnBackOrder] [int] NULL,
        [Freezable] [varchar](1) NULL,
        [DeleteWhenOut] [varchar](1) NULL,
        [ReplenishPoint] [int] NULL,
        [MfrDlList] [money] NULL,
        [SubstituteItemNum] [varchar](6) NULL,
        [SubstitutionCode] [varchar](1) NULL,
        [PurchaseDlEndDt] [datetime] NULL,
        [ReplacementItemNum] [varchar](6) NULL,
        [MjrItemNum] [varchar](25) NULL,
        [FutMfrDlStartDt] [datetime] NULL,
        [FutMfrDlEndDt] [datetime] NULL,
        [BuyerID] [varchar](3) NULL,
        [NegAdjType] [varchar](3) NULL,
        [MjrFutSpecPCDt] [datetime] NULL,
        [FutMfrDlList] [money] NULL,
        [PonyShipment] [varchar](1) NULL,
        [Plastic] [varchar](1) NULL,
        [PrevReplenishDt] [datetime] NULL,
        [ReplenishCode] [varchar](3) NULL,
        [MfrDlMinQty] [smallint] NULL,
        [GuaranteeDt] [datetime] NULL,
        [ChainRestriction] [varchar](2) NULL,
        [RXUnits] [numeric](10, 3) NULL,
        [PurchaseDlAWP] [money] NULL,
        [GuaranteeAWC] [money] NULL,
        [LegendCode] [varchar](2) NULL,
        [RebatePct] [numeric](6, 5) NULL,
        [Last52WeeksSoldMjr] [int] NULL,
        [FacingInches] [numeric](5, 2) NULL,
        [MonthEndInventory] [int] NULL,
        [MonthEndAWC] [money] NULL,
        [Last3WeeksSold] [int] NULL,
        [ToughToPick] [varchar](1) NULL,
        [ItemType] [varchar](1) NULL,
        [TUDlList] [money] NULL,
        [TUDlCost] [money] NULL,
        [MfrDlCost] [money] NULL,
        [FutAWP] [money] NULL,
        [FutAWC] [money] NULL,
        [ItemReturnable] [varchar](1) NULL,
        [RebateYesNo] [varchar](1) NULL,
        [Carded] [varchar](1) NULL,
        [PalletCapacity] [int] NULL,
        [SpecialOrderOnly] [varchar](1) NULL,
        [FutTUDlStartDt] [datetime] NULL,
        [FutTUDlEndDt] [datetime] NULL,
        [FutTUDlList] [money] NULL,
        [FutMfrDlCost] [money] NULL,
        [FutTUDlMinQty] [smallint] NULL,
        [FutTUDlCost] [money] NULL,
        [AcquisitionCost] [money] NULL,
        [FutAcquisitionCost] [money] NULL,
        [StoreRepackNet] [money] NULL,
        [MjrSpecialPrice] [money] NULL,
        [MjrFutSpecialPrice] [money] NULL,
        [MfrMinShipQty] [int] NULL,
        [VRXGenEnforce] [varchar](1) NULL,
        [CrossRefNum] [varchar](6) NULL,
        [PurchaseDlStartDt] [datetime] NULL,
        [PurchaseDlAWC] [money] NULL,
        [Color] [varchar](15) NULL,
        [Shape] [varchar](8) NULL,
        [Flavor] [varchar](15) NULL,
        [BonusReasonCode] [varchar](3) NULL,
        [BonusReoccursFlag] [varchar](1) NULL,
        [FutPurchaseDlStartDt] [datetime] NULL,
        [FutPurchaseDlEndDt] [datetime] NULL,
        [FutPurchaseDlAWC] [money] NULL,
        [FutPurchaseDlAWP] [money] NULL,
        [NewItemRptMjr] [varchar](1) NULL,
        [ReplItemRptMjr] [varchar](1) NULL,
        [RepackStoreItemNum] [varchar](6) NULL,
        [RepackWhseItemNum] [varchar](6) NULL,
        [RepackBulkItemNum] [varchar](6) NULL,
        [RepackVendorItemNum] [varchar](6) NULL,
        [RepackPriceChangeDt] [datetime] NULL,
        [ChemicalName] [varchar](20) NULL,
        [MjrSub1] [varchar](6) NULL,
        [MjrSub2] [varchar](6) NULL,
        [OutOfStockDt] [datetime] NULL,
        [ProgressivePrice] [money] NULL,
        [ContractSellPrice2] [money] NULL,
        [ContraceSellPrice3] [money] NULL,
        [ContractPriceOverride] [char](1) NULL,
        [NetDealStartDate] [datetime] NULL,
        [NetDealEndDate] [datetime] NULL,
        [NetDealCost] [money] NULL,
        [ProgressiveNetFlag] [char](1) NULL,
        [ProductGroupID] [int] NOT NULL,
        [DiscontinuedCode] [char](2) NULL,
        [BrandName] [varchar](16) NULL,
        [ProductDescr] [varchar](24) NULL,
        [SaleUnitQuantity] [int] NULL,
        [SizeUnits] [varchar](64) NULL,
        [SizeQuantity] [smallint] NULL,
        [SizeContainer] [varchar](16) NULL,
        [TypeCode] [varchar](3) NULL,
        [DoseStrengthUnits] [varchar](12) NULL,
        [DoseFormType] [varchar](12) NULL,
        [DoseStrengthQuantity] [int] NULL,
        [PreviousAWC] [money] NULL,
        [LastPriceChangeDate] [smalldatetime] NULL,
        [StockStatus] [varchar](9) NULL,
        [SelectCareAWC] [money] NULL,
        [BuildCustomers] [char](1) NULL,
        [RecalcNet] [char](1) NULL,
        [CompetitionRetail] [money] NULL,
        [PreviousOutCode] [char](1) NULL,
        [PreviousStockStatus] [varchar](9) NULL,
        [YtdSlsRank] [int] NULL,
        [YtdQtyRank] [int] NULL,
        [MonitoredItem] [char](1) NULL,
        [Refrigerate] [bit] NULL,
        [EachBarCodeNum] [varchar](25) NULL,
        [NoBarCode] [bit] NULL,
        [RecalcReason] [varchar](64) NULL,
        [Contract2NetFlag] [char](1) NULL,
        [Contract3NetFlag] [char](1) NULL,
        [LastSaleDate] [smalldatetime] NULL,
        [ModifiedFlag] [char](1) NULL,
        [SellingPrice] [money] NULL,
        [SellingPriceFlag] [char](1) NULL,
        [SellingPriceFormula] [varchar](128) NULL,
        [PharmacySupply] [bit] NULL,
        [BillAsCategory] [varchar](3) NULL,
        [MjrMjrItemNum] [varchar](25) NULL,
        [MjrUPCNum] [varchar](12) NULL,
        [ContractSellPrice4] [money] NULL,
        [ContractSellPrice5] [money] NULL,
        [ContractSellPrice6] [money] NULL,
        [ContractSellPrice7] [money] NULL,
        [Contract4NetFlag] [char](1) NULL,
        [Contract5NetFlag] [char](1) NULL,
        [Contract6NetFlag] [char](1) NULL,
        [Contract7NetFlag] [char](1) NULL,
        [MedicarePackage] [char](1) NULL,
        [OrderQtyMultiplier] [int] NOT NULL,
        [SoldShortDated] [bit] NOT NULL,
        [ReturnTimeLimit] [int] NULL,
        [ReturnSalableTimeLimit] [int] NULL,
        [ReturnReviewRequired] [bit] NOT NULL,
        [GenericSwitchDate] [datetime] NULL,
        [SalesForecastStartDate] [datetime] NULL,
        [SalesForecastNumDays] [int] NULL,
        [SalesForecastQuantity] [int] NULL,
        [IMAReportable] [char](1) NULL,
        [SalesForLast52Weeks] [money] NULL,
        [Area] [varchar](1) NULL,
        [FromLocation] [int] NULL,
        [ToLocation] [int] NULL,
        [SizeForm] [varchar](16) NULL,
        [UnitOfPurchase] [varchar](16) NULL,
        [PurchaseMultiple] [int] NULL,
        [ClozarilFlag] [bit] NOT NULL,
        [ClozapineFlag] [bit] NOT NULL,
        [OverstockPicking] [bit] NULL,
        [AccutaneFlag] [bit] NOT NULL,
        [FazacloFlag] [bit] NOT NULL,
        [FineLineCode] [char](4) NULL,
        [FinerCode] [int] NULL,
        [FinerSubCat] [int] NULL,
        [FinerCat] [int] NULL,
        [HighPriceMultiplier] [smallint] NULL,
        [HamacherGTIN] [varchar](14) NULL,
        [NovixusItem] [bit] NOT NULL,
        [FineLineSource] [char](1) NULL,
        [Keywords] [varchar](8000) NULL,
        [ReportNewItemToCustomer] [bit] NOT NULL,
        [CDMAE2Item] [bit] NOT NULL,
        [ReportNewItemToCustomerExclude] [bit] NOT NULL,
     CONSTRAINT [PK_Items] PRIMARY KEY CLUSTERED 
    (
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY],
     CONSTRAINT [IX_BrandItem] UNIQUE NONCLUSTERED 
    (
        [BrandItemNum] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY],
     CONSTRAINT [IX_Items] UNIQUE NONCLUSTERED 
    (
        [Category] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY],
     CONSTRAINT [IX_VenItmNum] UNIQUE NONCLUSTERED 
    (
        [VendorNum] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]
    ) ON [PRIMARY]
      
    GO
      
    /****** Object:  Index [IX_ChemName]    Script Date: 07/22/2010 06:52:19 ******/
    CREATE UNIQUE NONCLUSTERED INDEX [IX_ChemName] ON [dbo].[Items] 
    (
        [ChemicalName] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]
    GO
      
      
    /****** Object:  Index [IX_Description]    Script Date: 07/22/2010 06:52:19 ******/
    CREATE NONCLUSTERED INDEX [IX_Description] ON [dbo].[Items] 
    (
        [Description] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]
    GO
      
      
    /****** Object:  Index [IX_LineRackShelfSlot]    Script Date: 07/22/2010 06:52:19 ******/
    CREATE NONCLUSTERED INDEX [IX_LineRackShelfSlot] ON [dbo].[Items] 
    (
        [LineNum] ASC,
        [RackNum] ASC,
        [ShelfNum] ASC,
        [SlotNum] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]
    GO
      
      
    /****** Object:  Index [IX_MjrKerrNum]    Script Date: 07/22/2010 06:52:19 ******/
    CREATE NONCLUSTERED INDEX [IX_MjrKerrNum] ON [dbo].[Items] 
    (
        [MjrItemNum] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]
    GO
      
      
    /****** Object:  Index [IX_NDCNum]    Script Date: 07/22/2010 06:52:19 ******/
    CREATE NONCLUSTERED INDEX [IX_NDCNum] ON [dbo].[Items] 
    (
        [NDCNum] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 70) ON [PRIMARY]
    GO
      
      
    /****** Object:  Index [IX_NonBrandItem]    Script Date: 07/22/2010 06:52:19 ******/
    CREATE NONCLUSTERED INDEX [IX_NonBrandItem] ON [dbo].[Items] 
    (
        [NonBrandItemNum] ASC,
        [ItemNum] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = OFF, FILLFACTOR = 70) ON [PRIMARY]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_ProductGroupID]  DEFAULT ((0)) FOR [ProductGroupID]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_SizeQuantity]  DEFAULT ((0)) FOR [SizeQuantity]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_DoseStrengthQuantity]  DEFAULT ((0)) FOR [DoseStrengthQuantity]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_PreviousAWC]  DEFAULT ((0)) FOR [PreviousAWC]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_BuildCustomers]  DEFAULT ('Y') FOR [BuildCustomers]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_RecalcNet]  DEFAULT ('Y') FOR [RecalcNet]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_Refrigerate]  DEFAULT ((0)) FOR [Refrigerate]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_NoBarCode]  DEFAULT ((0)) FOR [NoBarCode]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_RecalcReason]  DEFAULT ('NewItem') FOR [RecalcReason]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_ModifiedFlag]  DEFAULT ('') FOR [ModifiedFlag]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_OrderQtyMultiplier]  DEFAULT ((1)) FOR [OrderQtyMultiplier]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_SoldShortDated]  DEFAULT ((0)) FOR [SoldShortDated]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_ReturnReviewRequired]  DEFAULT ((0)) FOR [ReturnReviewRequired]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_SalesForecastNumDays]  DEFAULT ((0)) FOR [SalesForecastNumDays]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_SalesForecastQuantity]  DEFAULT ((0)) FOR [SalesForecastQuantity]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_IMAReportable]  DEFAULT ('Y') FOR [IMAReportable]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_SalesForLast52Weeks]  DEFAULT ((0)) FOR [SalesForLast52Weeks]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_UnitOfPurchase]  DEFAULT ('Case') FOR [UnitOfPurchase]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_PurchaseMultiple]  DEFAULT ((1)) FOR [PurchaseMultiple]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF__Items__ClozarilF__5FCC3F22]  DEFAULT ((0)) FOR [ClozarilFlag]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF__Items__Clozapine__60C0635B]  DEFAULT ((0)) FOR [ClozapineFlag]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF__Items__AccutaneF__62A8ABCD]  DEFAULT ((0)) FOR [AccutaneFlag]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF__Items__FazacloFl__639CD006]  DEFAULT ((0)) FOR [FazacloFlag]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_FineLineCode]  DEFAULT ('') FOR [FineLineCode]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_FinerCode]  DEFAULT ((0)) FOR [FinerCode]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_FinerSubCat]  DEFAULT ((0)) FOR [FinerSubCat]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_FinerCat]  DEFAULT ((0)) FOR [FinerCat]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_HighPriceMultiplier]  DEFAULT ((0)) FOR [HighPriceMultiplier]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_NovixusItem]  DEFAULT ((0)) FOR [NovixusItem]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  CONSTRAINT [DF_Items_ReportNewItemToCustomer]  DEFAULT ((0)) FOR [ReportNewItemToCustomer]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  DEFAULT ((0)) FOR [CDMAE2Item]
    GO
      
    ALTER TABLE [dbo].[Items] ADD  DEFAULT ((0)) FOR [ReportNewItemToCustomerExclude]
    GO

    The revelant portion of the Domail Model XML is:

    <orm:index name="IX_Description">
      <orm:column name="Description" sql-type="varchar" length="26" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_LineRackShelfSlot">
      <orm:column name="LineNum" sql-type="varchar" length="3" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_LineRackShelfSlot">
      <orm:column name="RackNum" sql-type="smallint" ado-type="Int16" />
      <orm:column name="ShelfNum" sql-type="varchar" length="1" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_LineRackShelfSlot">
      <orm:column name="SlotNum" sql-type="varchar" length="1" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_MjrKerrNum">
      <orm:column name="MjrItemNum" sql-type="varchar" length="25" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_NDCNum">
      <orm:column name="NDCNum" sql-type="varchar" length="11" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_NDCNum">
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_NonBrandItem">
      <orm:column name="NonBrandItemNum" sql-type="varchar" length="6" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_BrandItem" unique="true">
      <orm:column name="BrandItemNum" sql-type="varchar" length="6" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_ChemName" unique="true">
      <orm:column name="ChemicalName" sql-type="varchar" length="20" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_Items" unique="true">
      <orm:column name="Category" sql-type="varchar" length="3" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>
    <orm:index name="IX_VenItmNum" unique="true">
      <orm:column name="VendorNum" sql-type="varchar" length="6" ado-type="Varchar" />
      <orm:column name="ItemNum" sql-type="varchar" nullable="false" length="6" primary-key="true" ado-type="Varchar" />
    </orm:index>

    The mapper duplicated two of the indexes, IX_NDCNum and IX_LineRackShelfSlot by dividing the index fields into multiple groups.

    How do I get the database reverse mapping to ignore indexes?
  2. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts

    Posted 22 Jul 2010 Link to this post

    Hi Mark McPherson,

    I recommend you using the Update from database wizard. It is used to update a domain model after modifications made to the database. It will allow you to merge the differences between the model and the database. Helpful information regarding the wizard can be found in the following section OpenAccess ORM Visual Designer > OpenAccess Model Tools > Visual Designer > Update from Database in the documentation we ship with the product.
    Hope that helps.

    Kind regards,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top