If you get the error while you try to save changes to an entity "Unable to update the EntitySet '<Entity name> because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.", just check the table that the entity is mapped to.
Confirm that the table has a primary key defined.