Entity Framework Unit Of Work and Null
===

so im a bit stuck, its either something really simple im missing or a big chunk of code.

im updating an existing record (two tables)

    using (IUnitOfWork uw = _uwf.Create())
                {
                    DomainObjects.Appointment newAppointment = uw.Appointment.FindAppointmentById(Id);
                    newAppointment.AppointmentItems.Clear();
    
                    newAppointment.ClientId = clientId;
                    newAppointment.AllDay = false;
                    newAppointment.StartTime = startTime;
                    newAppointment.EndTime = endTime;
                    newAppointment.Notes = notes;
                    newAppointment.PetId = petId;
                    foreach (DomainObjects.AppointmentItem item in appointmentItems)
                    {
                        item.AppointmentId = newAppointment.Id;
                        newAppointment.AppointmentItems.Add(item);
                    }
    
                    
                    uw.Commit();
                }

The issue is with the appointmentItems as when it does the db update I get
"{"Cannot insert the value NULL into column 'AppointmentId', table 'database.dbo.AppointmentItems'; column does not allow nulls. UPDATE fails.\r\nThe statement has been terminated."}"

However  the AppointmentId has a string value.
The sql looks like 

    exec sp_executesql N'update [dbo].[AppointmentItems]
    set [AppointmentId] = null
    where ([Id] = @0)
    ',N'@0 nvarchar(50)',@0=N'45f56af1-7fe5-46c3-9a02-a1df09a4fbfa'

Any Ideas?