C
CGatto
Hi All,
I am using EF (Framework 3.5 SP1) and have a simple two table demo set up:
Applicants
- applicant_id int
- applicant_pref_lang_coorepondence int (FK to CodeLanguages)
- applicant_pref_lang_exam int (FK CodeLanguages)
- applicant_pref_lang_interview int (FK CodeLanguages)
CodeLanguages
- code_lang_id int
- code_lang_desc
A CodeLanguage entry can have 0, 1, * Applicants
Each language ref in Applicants must have 1 (and only one) CodeLanguage ref.
Problem:
When I bring back an Applicant entity, if all three language references
(coorespondence, exam, and interview) are all the same, lets say 1000
(english), and then I modify one of them, for example to 1001 (french), then
all THREE will be changed to 1001 (french).
Here's the weird part: If all three references are different (lets say
coorespondence=english, exam=french, and interview=spanish) and I change one
of them - then it behaves as expected and only the one I changed is
affected - the others are remain in their original state.
I have spent most of today trying various things such as dropping and
recreating associations in the EDMX, recreating the EDMX datamodel - even
creating a new database. None of this worked - I'm beginning to thing the
issue is with EF and not my code.
Any ideas? Thanks.
I am using EF (Framework 3.5 SP1) and have a simple two table demo set up:
Applicants
- applicant_id int
- applicant_pref_lang_coorepondence int (FK to CodeLanguages)
- applicant_pref_lang_exam int (FK CodeLanguages)
- applicant_pref_lang_interview int (FK CodeLanguages)
CodeLanguages
- code_lang_id int
- code_lang_desc
A CodeLanguage entry can have 0, 1, * Applicants
Each language ref in Applicants must have 1 (and only one) CodeLanguage ref.
Problem:
When I bring back an Applicant entity, if all three language references
(coorespondence, exam, and interview) are all the same, lets say 1000
(english), and then I modify one of them, for example to 1001 (french), then
all THREE will be changed to 1001 (french).
Here's the weird part: If all three references are different (lets say
coorespondence=english, exam=french, and interview=spanish) and I change one
of them - then it behaves as expected and only the one I changed is
affected - the others are remain in their original state.
I have spent most of today trying various things such as dropping and
recreating associations in the EDMX, recreating the EDMX datamodel - even
creating a new database. None of this worked - I'm beginning to thing the
issue is with EF and not my code.
Any ideas? Thanks.