TPT with designer can generate errors 3034 or 3021

I found two cases of errors generated by the EDM designer when you want to do TPT.

Error 3034:

Imagine the following scenario:

  • A table Contacts
    • ContactID (PK)
  • A table Employees
    • ContactID (PK)
    • OfficeID (Nullable, FK to Offices.OfficeID)
  • A table Offices
    • OfficeIF (PK)

To do TPT between Contacts and Employees with designer, I do the following:

  • I delete the relationship between Employees and Contacts.
  • I also delete Employees.EmployeeID property.
  • Then I add inheritance between Employees and Contacts.
  • Then, always with designer, I remap the Employees entity type and the relationship between Employees and Offices

Here I have an error because the designer "forgets" the condition IsNull=false in the relationship mapping.

Error 3021

Imagine the following scenario:

  • A table Contacts
    • ContactID (PK)
  • A table Employees
    • ContactID (PK)
  • A table Hodidays 
    • EmployeeID (PK, KF to Employees.ContactID)
    • From (PK)

I want to do TPT as previously.

In this case, I have an error 3021 because the designer "forgets" the CSDL association ReferentialConstraint which is inevitable if the FK is in the PK.

 

So ok, there are some bugs in the designer but don't forget that designer is just here for help. So these bugs don't prevented you to use EF. Wink

Published Wed, Sep 17 2008 3:19 by Matthieu MEZIL

Comments

# re: TPT with designer can generate errors 3034 or 3021

So ok, there are some bugs in the designer but don't forget that designer is just here for help. So these bugs don't prevented you to use EF.

Yes, they do. few people want or should know the ugly details of of the xml. These tools should raise the level of abstraction. The designer has some real problems that need to be addressed..

Thursday, September 18, 2008 11:34 AM by TLP

# re: TPT with designer can generate errors 3034 or 3021

"don't forget that designer is just here for help."

Seems like a finished product it should be fully functional.  Of course bugs will exist, but to say that really just makes me think EF is not a finished product.  This view is reinforced by many other things, such as lack not just of documentation, but apparent thought to how EF will really be used - such as with WCF.

I have to conclude that, although I like EF and will continue to work with it, it is really more of a beta than a finished product.

Saturday, October 11, 2008 12:00 AM by Huh? Seriously

# EDM designer

I didn’t blog for a (too) long time which is strange for me. I received some emails asking if I

Wednesday, January 07, 2009 3:48 AM by Matthieu MEZIL

# EDM Designer

I didn’t blog for a (too) long time which is strange for me. I received some emails asking if I

Wednesday, January 07, 2009 3:49 AM by Matthieu MEZIL

# EDM Designer

I didn’t blog for a (too) long time which is strange for me. I received some emails asking if I

Wednesday, January 07, 2009 3:55 AM by Matthieu MEZIL

# EDM Designer

I didn’t blog for a (too) long time which is strange for me. I received some emails asking if I

Wednesday, January 07, 2009 4:18 AM by Matthieu MEZIL

Leave a Comment

(required) 
(required) 
(optional)
(required)