Me isn't clearly how can I build the relation between TblanlagehauptEntity and TblabteilungEntity in the LLBLGen Designer , there is the TstamAbteilungEntity between them.
In the Attachment you can see the relations in SQL-Server Management Studio and in LLBLGen Designer
Here are the three Tables
CREATE TABLE [dbo].[TBLANLAGEHAUPT](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ANLAGE] [nvarchar](50) NULL,
[STANDORT] [nvarchar](50) NULL,
[BESCHREIBUNG] [nvarchar](250) NULL,
[STATUS] [int] NULL,
[UNTERLAGENBEFINDENSICH] [nvarchar](100) NULL,
[Verantwortlicher] [nvarchar](50) NULL,
[EMAILADRESSE] [nvarchar](100) NULL,
[TELEFON] [nvarchar](50) NULL,
[Baujahr] [nvarchar](10) NULL,
[IDENTNUMMER] [nvarchar](150) NULL,
[FREIENUMMER1] [int] NULL,
[FREIENUMMER2] [int] NULL,
[FREIERTEXT1] [nvarchar](255) NULL,
[FREIERTEXT2] [nvarchar](255) NULL,
[HistorieDrucken] [bit] NOT NULL,
[Kategorie] [nvarchar](50) NULL,
[GruppierungAus] [nvarchar](20) NOT NULL,
[fKategorie] [smallint] NULL,
[ABTEILUNG] [varchar](50) NULL,
[UnterKategorie] [varchar](50) NULL,
[FREIERTEXT3] [nvarchar](255) NULL,
[FREIERTEXT4] [nvarchar](255) NULL,
[FREIERTEXT5] [nvarchar](255) NULL,
[FREIERTEXT6] [nvarchar](255) NULL,
[FABTEILUNG] [int] NOT NULL,
CONSTRAINT [PK_TBLANLAGEHAUPT] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[TBLABTEILUNG](
[id] [int] IDENTITY(1,1) NOT NULL,
[Abteilung] [nvarchar](50) NOT NULL,
[fid] [smallint] NOT NULL,
[ABTEILUNGID] [int] NOT NULL,
CONSTRAINT [PK_TBLABTEILUNG] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
CREATE TABLE [dbo].[TSTAM_ABTEILUNG](
[ID] [int] IDENTITY(1,1) NOT NULL,
[Abteilungsname] [nchar](200) NOT NULL,
[AufAm] [date] NOT NULL,
[AufVon] [nchar](100) NOT NULL,
CONSTRAINT [PK_STAM_ABTEILUNG] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
I hope you can help me
Thanks
Christof