Hello there,

1. nopCommerce version
4.00

2. Expected behavior
After following your tutorial to connect a plugin to the database and create a table, I should be able to add a OrderId foreign key in my new table.

3. Actual behavior
I am getting InvalidOperationException: Unable to determine the principal end of an association between the types 'Nop.Core.Domain.Customers.RewardPointsHistory' and 'Nop.Core.Domain.Orders.Order'. The principal end of this association must be explicitly configured using either the relationship fluent API or data annotations.

However, I do not do anything with RewardPointsHistory, so I believe it is a bug.

4. Steps to reproduce the problem
Create a plugin which uses the database. In your model, use
public virtual Order Order { get; set; }
and in your Map class use
HasRequired(a => a.Order).WithRequiredDependent();


Try to install.

5. Any private modifications you made to your nopCommerce