Problem With Retrive Database Object in SqlServer

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
alireza_eslampanah
Posts: 5
Joined: Mon 14 May 2012 05:04

Problem With Retrive Database Object in SqlServer

Post by alireza_eslampanah » Tue 15 May 2012 05:22

I have a problem with Retrieve Database Tables in the DatabaseFirst Mode In SqlServer

I Get an Error :
this method or property cannot be called on Null values

I Discovered that when a table have a Constraint(relation or index or Constraint) with other table on different Schema than first table this error Raised.
It Seems be a bug in EntityDeveloper
Please Help me.

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Re: Problem With Retrive Database Object in SqlServer

Post by Helen » Tue 15 May 2012 08:51

Unfortunately, we cannot reproduce the issue in our environment at the moment.

Please specify the following:
1) the exact model (NHibernate, Entity Framework or LINQ to SQL) you are using during development;
2) the exact version (x.x.xxx) of Entity Developer;
3) When does the error occur exactly? When you are trying to expand the Tables node in the Create Wizard or the Database Explorer?
4) Please also send us your database creation script so that we could reproduce the issue.

alireza_eslampanah
Posts: 5
Joined: Mon 14 May 2012 05:04

Re: Problem With Retrive Database Object in SqlServer

Post by alireza_eslampanah » Wed 16 May 2012 03:59

Thanks for your reply

1)Nhibernate
2) Entity Developer 4.3.178 Free And Test Older Versions
3)When Expand Tables Node Both Wizard And Database Explorer(Both Group By Schema and Normal)
4)Script:
CREATE TABLE [PRD].[tbProduct](
[productID] [int] NOT NULL,
[productCode] [varchar](10) NOT NULL,
[productName] [nvarchar](100) NOT NULL,
[productModelNo] [nvarchar](50) NULL,
CONSTRAINT [PK_tbProduct] PRIMARY KEY CLUSTERED
(
[productID] 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 [PRD].[tbProduct] WITH CHECK ADD CONSTRAINT [FK_tbProduct_tbItem] FOREIGN KEY([productID])
REFERENCES [ITM].[tbItem] ([itemID])
GO


CREATE TABLE [ITM].[tbItem](
[itemID] [int] IDENTITY(1,1) NOT NULL,
[itemBaseNameID] [int] NOT NULL,
[itemCode] [varchar](100) NOT NULL,
CONSTRAINT [PK_tbItem_1] PRIMARY KEY CLUSTERED
(
[itemID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Re: Problem With Retrive Database Object in SqlServer

Post by Helen » Wed 16 May 2012 10:26

Thank you for additional information.

We executed your script on a clean database and couldn't reproduce the error. Apparently, some other database objects affect the error occurrence.

Is the described error reproduced when connecting to other databases?
Could you send us the complete script for database creation?

alireza_eslampanah
Posts: 5
Joined: Mon 14 May 2012 05:04

Re: Problem With Retrive Database Object in SqlServer

Post by alireza_eslampanah » Sun 27 May 2012 09:41

unfortunately for security reason of my company,I can not script database for you.
but i see that when in a relation between two table in different schema we have extra index in second table that columns in the index equal to index primary column,this error raised.
So I removed extra Index and Problem Temporarily Solved.
Thanks for your Attention

Post Reply