views:

172

answers:

1

Hi

I have an entity that has a primary key that is set to identity and the type is bigint (long in C#).

When I add a new object to ObjectContext and try to save changes to the database, I get the following error:

A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: 'Id'."

I don't really understand what's going on here. True, the identity column is set to 0 by default upon creation, but that shouldn't be preventing EF from figuring out it's an identity field.

What's going on here?

Thank you

+1  A: 

Well, apparently someone created a strange bidirectional relationship between tables that wasn't even supposed to be there.

I deleted it and it's working now.

VexXtreme