|
The property 'XXX' is part of the object's key information and cannot be modified.
|
|||
---|---|---|---|
#18+
Добрый день. При обновлении данных возникла ошибка: Submit operation failed. The property 'idCourse' is part of the object's key information and cannot be modified. Обновление проходит через WCF RIA Service. Добавление и удаление работает на ура. Да самое интиресное что и редактирование работало в другой версии проекта. Я понимаю саму суть ошибки, что мой код пытается изменить PK. Но я не могу понять на каком уровне проблема: БД, Модель БД и сервис? Если есть какие-то идеи - буду рад выслушать. Спасибо. ... |
|||
:
Нравится:
Не нравится:
|
|||
16.04.2012, 13:48 |
|
The property 'XXX' is part of the object's key information and cannot be modified.
|
|||
---|---|---|---|
#18+
smuchka, попроси модераторов перекинуть твою тему "экстрасенсы отвечают". а то тут долго ждать будешь. ... |
|||
:
Нравится:
Не нравится:
|
|||
16.04.2012, 13:49 |
|
The property 'XXX' is part of the object's key information and cannot be modified.
|
|||
---|---|---|---|
#18+
smuchkaНо я не могу понять на каком уровне проблема: БД, Модель БД и сервис?Может stack trace исключения прольёт свет на эту тайну? ... |
|||
:
Нравится:
Не нравится:
|
|||
16.04.2012, 13:53 |
|
The property 'XXX' is part of the object's key information and cannot be modified.
|
|||
---|---|---|---|
#18+
Алексей К, Вот... at System.Data.Objects.EntityEntry.CompareKeyProperties(Object changed) at System.Data.Objects.EntityEntry.ApplyOriginalValuesInternal(IEntityWrapper wrappedOriginalEntity) at System.Data.Objects.EntityEntry.ApplyOriginalValues(Object originalEntity) at System.ServiceModel.DomainServices.EntityFramework.ObjectContextUtilities.AttachAsModifiedInternal[T](T current, T original, ObjectContext objectContext) at System.ServiceModel.DomainServices.EntityFramework.ObjectContextExtensions.AttachAsModified[T](ObjectSet`1 objectSet, T current, T original) at COURSES_spo.Web.Services.DataServices.CLAIMSDomainService.UpdateCours(Cours currentCours) in D:\SILVERLIGHT\Projects of Diplom\5_diplom\COURSES_spo\COURSES_spo.Web\Services\DataServices\CLAIMSDomainService.cs:line 569 at UpdateCours(DomainService , Object[] ) at System.ServiceModel.DomainServices.Server.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters) at System.ServiceModel.DomainServices.Server.DomainService.InvokeDomainOperationEntry(DomainOperationEntry domainOperationEntry, Object[] parameters, ChangeSetEntry operation) at System.ServiceModel.DomainServices.Server.DomainService.InvokeCudOperations() at System.ServiceModel.DomainServices.Server.DomainService.ExecuteChangeSet() at System.ServiceModel.DomainServices.Server.DomainService.Submit(ChangeSet changeSet) at System.ServiceModel.DomainServices.Hosting.ChangeSetProcessor.Process(DomainService domainService, IEnumerable`1 changeSetEntries) at System.ServiceModel.DomainServices.Hosting.SubmitOperationBehavior.SubmitOperationInvoker.InvokeCore(Object instance, Object[] inputs, Object[]& outputs) ... |
|||
:
Нравится:
Не нравится:
|
|||
16.04.2012, 13:57 |
|
The property 'XXX' is part of the object's key information and cannot be modified.
|
|||
---|---|---|---|
#18+
smuchka, из описания ошибки видно, что ругается EntityFramework, у меня подозрение на плохо спроектированную БД и затем импортированную в EntityFramework. ... |
|||
:
Нравится:
Не нравится:
|
|||
16.04.2012, 14:39 |
|
|
start [/forum/topic.php?fid=21&msg=37755432&tid=1441846]: |
0ms |
get settings: |
9ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
42ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
51ms |
get tp. blocked users: |
2ms |
others: | 13ms |
total: | 151ms |
0 / 0 |