IMP: Choose Between Insert Or Search?

[email protected] Fri, 26 Sep 2003 19:52:17 -0400
Newsgroups gmane.comp.web.webobjects.eof,gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
I am using 4.5.1 and Oracle 8i. 

I have an applicantId field (in EOModeler) with the default NSDecimalNumber as the class value type B(?). When I insert into the table using these datatypes everything goes well but I cannot do a search on this table with that class value type. When I do a search on applicantId of NSDecimalNumber type I get an error : 

NSInvalidArgumentException: *** -[NSUnicodeString descriptionWithLocale:]: selector not recognized

So I changed the datatype to NSNumber and the value type to i. Everything was fine and now I can do a fetch on the table with ("applicantId =%@", new NSArray (applicantId)) as the qualifier. 

However when I try to insert a new record into the table it gives me the following error:  ClassCastException ... java/lang/Integer
So I am in a dillema here. I can do a fetch specification on the table IF the type is NSNumber and value type i but I can't do any more insertions. If however I do an insertion I can only do it with NSDecimalNumber BUT I will have to relinquish my wish to search on the record. 

Does anyone have a solution to this problem ? please.

A. Shiraz
44 Executive Boulevard
Elmsford, NY 10523
(914) 592- 4203 x268