Devart Entity Model Template generate data types incorrectly

Devart Entity Model Template generate data types incorrectly

Postby cjbiggs » Mon 25 Oct 2010 15:01

The VS 2010 Devart Entity Model Template and Entity Developer (EDML) generate the CSDL and the SSDL incorrectly from my Database View. It set all the fields in the view to Entity Keys and make them non-nullable. My Database view join 3 tables that have primarly keys, and some some nullable fields in the table. When I generate an EDMX using the ADO.NET Entity Model and dotConnect for Progres Provider it seem to be generated correctly.

I am using dotConnect for Progres 4.95.180.0

Thanks,

Charlie J.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby AndreyR » Tue 26 Oct 2010 14:16

You can edit your entity model (the Model and Model.Store sections in Model Explorer) and set Entity Key correctly.
Could you please send us (support * devart * com, subject "EF: Incorrect Entity Key generation for view") the script of the view?
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby cjbiggs » Tue 26 Oct 2010 15:06

I was having a problem setting it the model as well, because the Store had it as non-nullable and and changing the Model gives a fragmented mapping error because we are mapping nullable field to a non-nullable store.

I don't have an actual script for the tables and view I can send you, but just create some tables with non-nullable and nullable fields and use it in the view. The ADO.NET Entity will infer them correctly in the EDMX, but using the Devart Model will set every field as the Entity Key which have to be non-nullable in the EDML.

Thanks,

Charlie J.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby AndreyR » Thu 28 Oct 2010 14:51

I have performed a test using the latest 5.70.180 build of dotConnect for Oracle and the view containing a join of two tables with nulable and non-nullable columns was added with the correct key by both Entity Developer and the EDM wizard.
Hope you will be able to find a script of the view the problem is reproducible on.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby cjbiggs » Thu 28 Oct 2010 15:16

I am using dotConnect for Postgres 4.95.180.0 and not dotConnect for Oracle. My try it with dotConnect for Postgres 4.95.180.0.

Thanks,

Charlie J.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby AndreyR » Fri 29 Oct 2010 13:18

Thank you for the report, I have reproduced the problem.
I will let you know as soon as it is fixed.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby cjbiggs » Fri 29 Oct 2010 15:36

Great Thanks. I am able to work around it by editing all my views. It is alot of manual work.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby AndreyR » Tue 16 Nov 2010 17:12

Could you please try the latest 5.0.46 build of dotConnect for PostgreSQL?
We have fixed the error in it.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby cjbiggs » Wed 17 Nov 2010 19:04

Ok. I will do that and let you know by the end of this week.

Thanks,

Charlie J.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby cjbiggs » Wed 17 Nov 2010 22:01

It seem to be working better in some cases, but doesn't work right in other cases. It set all the fields to primarily keys when you have a view that uses over views inside of it.

Thanks,

Charlie J.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby AndreyR » Thu 18 Nov 2010 15:02

I have made a test using a view built over the join of two views (also with JOIN). The EDM wizard have not added this view at all, Entity Developer added the view (but the key was generated a bit incorrectly).
Could you please post here or send us (support * devart.com, subject "EF: Join View") the DDL script of the view causing the problem?
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Postby cjbiggs » Thu 18 Nov 2010 16:08

I would have to create a sample, because my view is tied to my application tables. But it seem like you was able to reproduce the problem yourself. The view that is composed of joining two other views set all fields in the returning view to primarily keys.
cjbiggs
 
Posts: 105
Joined: Fri 15 Jan 2010 19:56

Postby AndreyR » Fri 19 Nov 2010 09:35

We cannot query PostgreSQL metadata for hierarchies of the views.
I have tried to add a view built over join of two views.
EDM Wizard added it as XML comments into .edmx, beacuse it wasn't able to build Entity Key.
Entity Developer (Devart Entity model) has created an entity, but set only one column (not all as in your case) as Entity Key.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for PostgreSQL