Case sensitivity problem with primary keys in EOEditingContext.faultForRawRow

Marc Gumpinger <[email protected]> Sat, 29 Jul 2006 18:19:48 +0200
Newsgroups gmane.comp.web.webobjects.eof,gmane.comp.web.webobjects.admin
Message-ID <[email protected]>
Hi,

I have a raw row (an NSDictionary) that I got from fetching for raw  
row using an EOSQLExpression.
When I ask the editing context to turn that raw row into a fault  
using faultForRawRow, the ec tells me that there was no primary  
information in the raw row dictionary.
(EODatabaseContext throws an IllegalArgumentException with the  
message: ... "does not contain primary key information for entity" ...)

After digging through the EOF source I found that the simple root of  
the problem is case sensitivity.
EOEntity._globalIDForRowIsFinal which is supposed to return the  
EOKeyGlobalID iterates through the raw rows dictionary's keys to find  
those that match the entity's primaryKeyAttributeNames.

Now the problem - at least in my case - is, that the dictionary's  
keys are all upper case (here "ID") since that's what the database  
returned. However, the primary key's name in the eomodel is all lower  
case (here "id"). For this simple reason, the entire faultForRawRow  
doesn't work.


Is there an official solution to this problem?
I mean, it was no effort, to adopt the dictionary correspondingly so  
that the keys also match in case sensitivity. However, due to EOFs  
maturity I'm sure that I either made a mistake or oversaw something.


Thank you in advance
Marc


		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de