The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Valnuke (9) [Avatar] Offline
#1
Hello... I'm getting mad with this exception, I don't understand what I am doing wrong

I'm trying to update a record that has a FK field.

If I update the record when the FK is NULL, then everything goes fine, but if a FK is selected and I simply want to change it it gives me this exception.
ForeignKeyReferenceAlreadyHasValueException

I don't understand, why is it a problem to update this record? can you help me or you need more details? thanks

bye
Valnuke (9) [Avatar] Offline
#2
Re: ForeignKeyReferenceAlreadyHasValueException - I'm getting mad with this
I think I solved, I'm not sure how

I think that I was trying to change an object value while that was loaded somewhere else in the code.