title: EF Core 3.x: copying record does not work as expected
body: <p>I have the following model:</p>
  <pre><code>public partial class Device 
  {
      public string Id { get; set; }
      public string IMEI { get; set; }
      public virtual DeviceVerizon VerizonData { get; set; }
  }
  
  public class DeviceVerizon
  {
      public int DeviceId { get; set; }
      public virtual Device Device { get; set; }
      public string ServicePlan { get; set; }
      public string State { get; set; }
  }
  
  public class DeviceVerizonMap : IEntityTypeConfiguration&lt;DeviceVerizon&gt;
  {
      public void Configure(EntityTypeBuilder&lt;DeviceVerizon&gt; builder)
      {
          builder.ToTable(nameof(DeviceVerizon));
          builder.HasKey(d =&gt; d.DeviceId);
  
          builder.HasOne(o =&gt; o.Device)
              .WithOne(o =&gt; o.VerizonData)
              .HasForeignKey&lt;DeviceVerizon&gt;(a =&gt; a.DeviceId)
              .OnDelete(DeleteBehavior.Cascade)
              .IsRequired()
              ;
      }
  }
  
  public partial class DeviceMap : IEntityTypeConfiguration&lt;Device&gt;
  {
      public override void Configure(EntityTypeBuilder&lt;Device&gt; builder)
      {
          builder.ToTable(nameof(Device));
          builder.HasKey(d =&gt; d.Id);
          builder.HasIndex(d =&gt; d.IMEI).IsUnique();
      }
  }
  </code></pre>
  <p>so, <code>DeviceId</code> is PR and FK for <code>DeviceVerizon</code>.</p>
  <p>I want to reassign <code>DeviceVerizon</code> from one to another record of <code>Device</code>.</p>
  <p>I tried to it just change DeviceId from source Device to target device and no success: <a href="https://stackoverflow.com/questions/67714214/ef-3-x-change-primary-key-value">EF 3.x: Change Primary key value</a></p>
  <p>Ok, I try to create copy of DeviceVerizon data by the following way:</p>
  <pre><code>        CreateMap&lt;DeviceVerizon, DeviceVerizon&gt;()
              .ForMember(d =&gt; d.DeviceId, o =&gt; o.Ignore())
              ;
  </code></pre>
  <p>and then:</p>
  <pre><code>            var newVerizonData = _mapper.Map&lt;DeviceVerizon, DeviceVerizon&gt;(verizonData);
              newVerizonData.DeviceId = targetDeviceId;
  </code></pre>
  <p>(also, I tried <code>targetDevice.VerizonData = newVerizonData;</code> instead of <code>newVerizonData.DeviceId = targetDeviceId;</code>), in debugger I see, that <code>targetDevice.VerizonData</code> has expected data and that object has expected DeviceId (<code>targetDeviceId</code>), but after <code>await _context.SaveChangesAsync();</code> I don't have this verizon data at all in DB!</p>
  <p>What is wrong?</p>