I have this code (VS2010 ASP.NET MVC 3 with EF 4):

```
Project project = new Project();
project.Number = number;
project.Name = name;
context.AddObject(project);

ProjectUser projectUser = new ProjectUser();
projectUser.User = user;
projectUser.Status = 1;
project.ProjectUsers.Add(projectUser);

context.SaveChanges(true);

```

It generates the following error (on the "project.ProjectUsers.Add(projectUser)" line)

"The relationship between the two objects cannot be defined because they are attached to different ObjectContext objects."

I don't understand why cause, as far as I know, both objects are using the same ObjectContext (but I'm new to EF).

What am I doing wrong?
Thanks for your help!