I get this error when writing to the database:
A dependent property in a ReferentialConstraint is mapped to a store-generated column. Column: \'Paym
Is it possible that you defined a bad column relation between your tables? different columns and one was set as autonumeric.
It happened to me.