This project is read-only.

uncatchable Employee error

Oct 14, 2010 at 6:11 PM

Guys  thanks for your job       ......     I have two tables ( i tested it many times)  1-crs_Employee  and 2-crs_EmployeeAppointment

Error - if i addind reference   from  crs_EmployeeAppointment.Id_EmployeeAppointment  to Employee.Id_EmployeeAppointment  Importing doesn't work ???????     ---Why????7  :(

 

below is all code of the unworkable db :

[test  DB  called by CRM_NHydrate]

 

USE [CRM_NHydrate]
GO
/****** Object:  Table [dbo].[crs_Employee]    Script Date: 10/14/2010 21:03:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[crs_Employee](
    [Id_Employee] [varchar](6) NOT NULL,
    [Name] [varchar](150) NULL,
    [App] [varchar](50) NOT NULL,
    [Id_EmployeeAppointment] [int] NULL,
 CONSTRAINT [PK_crs_Employees] PRIMARY KEY CLUSTERED
(
    [Id_Employee] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Это имя роли пользователя ТПред Менеджер Директор но берется из названия определенной пользователю(с которым связан служащий) роли' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'crs_Employee', @level2type=N'COLUMN',@level2name=N'App'
GO
/****** Object:  Table [dbo].[crs_EmployeeAppointment]    Script Date: 10/14/2010 21:03:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[crs_EmployeeAppointment](
    [Id_EmployeeAppointment] [int] IDENTITY(1,1) NOT NULL,
    [Appointmentgg] [varchar](100) NULL,
 CONSTRAINT [PK_crs_EmployeeAppointment] PRIMARY KEY CLUSTERED
(
    [Id_EmployeeAppointment] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[crs_Employee]  WITH CHECK ADD  CONSTRAINT [FK_crs_Employee_crs_EmployeeAppointment] FOREIGN KEY([Id_EmployeeAppointment])
REFERENCES [dbo].[crs_EmployeeAppointment] ([Id_EmployeeAppointment])
GO
ALTER TABLE [dbo].[crs_Employee] CHECK CONSTRAINT [FK_crs_Employee_crs_EmployeeAppointment]

Oct 14, 2010 at 6:20 PM

Please send your model to chrisd@nhydrate.org.

Oct 14, 2010 at 6:56 PM
Edited Oct 14, 2010 at 7:03 PM

 

and the same problem as i see another two tables:

crs_Manager and   crs_Director - if i set reference to crs_Manager.Id_Director    - i again can't Import model

below is the codeof the DB - (I used  version  of 13 oktober)

 

I'i send you my model to your mail   some  later

 

I've sent two examples to your mail

 

USE [CRM_NHydrate]
GO
/****** Object:  Table [dbo].[crs_Director]    Script Date: 10/14/2010 21:54:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[crs_Director](
    [Id_Director] [char](6) NOT NULL,
    [Description] [varchar](50) NOT NULL,
 CONSTRAINT [PK_crs_Director] PRIMARY KEY CLUSTERED
(
    [Id_Director] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[crs_Manager]    Script Date: 10/14/2010 21:54:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[crs_Manager](
    [Id_Manager] [char](6) NOT NULL,
    [Description] [varchar](50) NOT NULL,
    [Id_Director] [char](6) NOT NULL,
 CONSTRAINT [PK_crs_Manager] PRIMARY KEY CLUSTERED
(
    [Id_Manager] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

Oct 15, 2010 at 6:43 AM

guys is it really bug         or       only my mistake?    send  your answer also to my work mail     a.utuzh@cersanit.ru  thanks.

Oct 17, 2010 at 8:53 AM

 It's xidius again  .....  can somebody telll me  is it really bug    or    only my mistake ? if NHydrate bug  then   when you'l be able to decide this problem, if it's my mistake then i'll find another way....    I'm sorry fo hurrying, but i've placed NHydrate into my Development cycle.

Thanks  again guys.

Oct 17, 2010 at 8:32 PM

I have not received the email. Please send your model to chrisd@nhydrate.org and to chrisd@gravitybox.com just in case.

Oct 19, 2010 at 11:05 AM

I've send my model again to chrisd@nhydrate.org and to chrisd@gravitybox.com. Look at it please

Oct 20, 2010 at 3:54 AM

I have sent to you a new DLL. Please let me know how if this works for you.

Oct 21, 2010 at 8:40 AM

Guys dll that you gave me is working. I could import all my model.

But there is one more error - I found that if table has more than one relations with other table(2 tables / 2 relations), than we have role that beginning from number(ex.: 1[crs_Employee->crs_EmplolyeeBoss]). First project can't be compile... and others too of course .

As I understand such names is unpossible( 1crs_Employee ) :
[Association(ThisKey = "Id_Employee", OtherKey = "Id_Employee" ]
public CRM.DTERROR.Business.LINQ.crs_EmployeeQuery 1crs_Employee { get; private set; }




I'm seding to you model to try it.

Guys thanks for your real support.

also want ask you something what it mean persistance - as i understand it is time when object exist in memory/cache (or not). But i do not know scenarious thjat using this concept.
1Can you give me link to read more about this concept(persistance)?

2Guys tell me please - are you going to make your project commercial?

3How about your module structure developing for big data models(200 and more)? As i understand your team is still doing somethink in this direction.

4How about Silverlght Support - simply DTO object that has no [Serializable()] attribute?

thanks

Nov 3, 2010 at 2:10 AM

I have used the database definition above and imported the model from a SQL 2008 database. I then generated it with EFDAL and NHDAL along with the database installer. I have no issues wither importing or compiling. Please use the latest version (179) and let me know if you have any more issues.