1

I am following John Papa's tutorial. When I edit speaker and save, I get following exception. I am very new to this. I really appreciate if someone can point me what I am missing. Thank you!

ExceptionMessage=Field not found: 'Breeze.ContextProvider.EntityInfo.AutoGeneratedKey'.
ExceptionType=System.MissingFieldException
StackTrace=   at System.Web.Http.ApiController.<InvokeActionWithExceptionFilters>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__0.MoveNext()


POST URL/breeze/Breeze/SaveChanges HTTP/1.1
Host: URL
Connection: keep-alive
Content-Length: 580
Accept: application/json, text/javascript, */*; q=0.01
Origin: URL
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36
Content-Type: application/json
Referer: URL
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8

{"entities":[{"Id":28,"FirstName":"Mary","LastName":"Block","Email":"[email protected]","Blog":"http://glennb.contoso.com","Twitter":"@gblock","Gender":"M","ImageSource":"glenn_block.jpg","Bio":"Father, Husband, Spiritualist, Software geek, Change agent, REST Head","__unmapped":{"isPartial":false,"isSpeaker":true},"entityAspect":{"entityTypeName":"Person:#CC.Model","defaultResourceName":"Persons","entityState":"Modified","originalValuesMap":{"IsPartial":true,"FirstName":"Glenn"},"autoGeneratedKey":{"propertyName":"Id","autoGeneratedKeyType":"Identity"}}}],"saveOptions":{}}
2
  • The exception tells you more than we can do without seeing your code. This is a 5-hour course (if I remember well), a bit long to see where a speaker is saved and what could possibly go wrong there. It looks like there is an entity without a key property. Commented Dec 28, 2013 at 22:17
  • 1
    Thanks for your response. I downloaded newer version of Breeze.ContextProvider.EF6 version 1.4.7 and Breeze.ContextProvider version 1.4.7. Originally I was using version 1.4.5 for both dll. The save works now. Commented Dec 31, 2013 at 6:08

1 Answer 1

2

Right, you will need that update:

You can use the Package Manager Console and run the following line to CC.DataAccess project: PM> Install-Package Breeze.Server.ContextProvider.EF6

https://www.nuget.org/packages/Breeze.Server.ContextProvider.EF6

My regards

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.