views:

270

answers:

4

Hi, i am new to Core Data and my model is to complex to describe it here, sorry.

My App fetch many small amounts of data from the web and store it to the core data entities. The saving is fine sometimes, but sometimes there is an

NSInternalInconsistencyException

with this description

binding not implemented for this SQLType 7

The Exception raises in the

[NSManagedObjectContext save:]

method so i cannot go through it using the debugger.

I checked my CoreData model and everything seems fine. I checked all values from the console and non of the required attributes are nil.

Maybe someone has an idee to fix this problem? Thanks

A: 

I'm getting this error as well. According to the somewhat dated SQL headers I found in the 10.4 SDK, type 7 is Real. My model uses the Decimal type quite extensively which probably maps to the SQL Real type. My best guess is that the SQL routines that bind these types to their statements are broken or incomplete.

A: 

Hi, my problem get solved when i save changed directly after they were made to the model. Maybe there are some unprocessed changes which overlap some other changes and this produce the error. According to Apple Docs you should always save changes directly after they are made

Remember that the managed object context acts like a scratch pad (see “Managed Objects and the Managed Object Context”). Whatever changes you make—whether editing property values or adding or deleting whole objects—aren’t actually committed to the persistent store (file) until you save the context. Typically, in an iPhone application, you save changes as soon as the user has made them.

CoreData iPhone Tutorial

Hope this help you solving your problem as well.

Good Luck ;-)

floorjiann
A: 

As it turns out this was a multi-threading issue having to do with locking the persistent store. Funny, it was never an issue on 10.4 or 10.5.

A: 

Anyone have any leads on this one? This error has been haunting me for the last 4 days, and I was able to dodge it by avoiding updating double values, but I can't avoid it anymore.

I found this post, but the solution didn't seem to help me.

http://www.cocoabuilder.com/archive/message/cocoa/2009/9/19/245476

Brian King
Look in you data model. For me, i got this problem again a week later. when i change all double attributes to decimal, the error was gone :)
floorjiann
That didn't work for me. I actually moved to an in-memory backing store and it went away. I got this from apple though:There's a known bug when using NSDecimalNumber to update float values in managed objects.It's fixed in 3.1. They recommended converting from NSDecimalNumber -> NSNumber as a work around.
Brian King