V4.1 Insert entity when the entity has unique constraint

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
I set the table Forums_Group's Name column with unique constraint.
And when i insert data,i get the error "System.InvalidOperationException:“The property 'Id' on entity type 'ForumGroup' has a temporary value while attempting to change the entity's state to 'Unchanged'. Either set a permanent value explicitly or ensure that the database is configured to generate values for this property.” at
method GetFullErrorTextAndRollbackEntityChanges in EfRepository class .
I search it online,and some people said it is bug of Entity Framework Core,might be this info can help you to resolve this.
Thanks.
5 years ago
I am doing a fresh installation of nopCommerce 4.1 on a production server with Microsoft SQL Server Express 2017.

The installation is failing with the following error:
Setup failed: The property 'Id' on entity type 'Store' has a temporary value while attempting to change the entity's state to 'Unchanged'. Either set a permanent value explicitly or ensure that the database is configured to generate values for this property.


Please advise how to fix this issue.
5 years ago
Anyone have idea on this?
Facing same issue at product insert time.
5 years ago
I Fixed this and it's working fine.

Look this post for more detail.
5 years ago
We fixed issue with the error message. Please see this commit for more details
5 years ago
Thank you all of you.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.