I've hit the same issue and while I haven't found a solution for 3.5SP1 I did confirm that this error goes away with EF 4.0.
Actually, a potential workaround for you would be to use a different field for the primary key in your PhotoDetails entity.
Craig Fisher
2009-09-04 05:02:18