It sounds like the Value Type in the model for one of these attributes is missing / wrong. See http://developer.apple.com/ documentation/WebObjects/UsingEOModeler/4WorkingWithAttributes/ chapter_4_section_3.html#//apple_ref/doc/uid/TP30001018-CH204-BABFGECE

In particular, c—tells the adaptor to generate SQL using RTRIM to strip off all trailing spaces.

Chuck


On May 16, 2006, at 1:14 PM, Marc Respass wrote:

Hi All,

My app cannot find records that exist using the fetch spec that I have. I develop locally using OpenBase and then move the app to our test box using Oracle. My fetch spec is

((payDate = $payDate) and ((sent = 0) or (sent = nil)) and ((objectCode = $code1) or (objectCode = $code2)))

I turned on eo debugging and see the SQL below generated which returns zero rows. When I simplify the SQL and submit it manually, I get the results I expect.

What is with RTRIM and RPAD? Could that have anything to do with it? Does anyone have any idea what's happening?

Thanks a lot
Marc

=== EO Generated
SELECT t0.AMOUNT, RTRIM(t0.CASE_TYPE_CLASS), RTRIM (t0.CASE_TYPE_OTHER), RTRIM(t0.CLIENT_NAME), RTRIM (t0.CLIENT_TYPE_OTHER), RTRIM(t0.DOC_ID), RTRIM(t0.DOCKET_NUM), t0.ACCOUNT_ID, t0.CASE_TYPE_ID, t0.CLIENT_TYPE_ID, t0.COURT_ID, t0.VENDOR_ID, RTRIM(t0.OBJECT_CODE), t0.PAY_DATE, t0.SENT, t0.TRAVEL_AMOUNT FROM ACCOUNT t0 WHERE ((t0.SENT = ? OR t0.SENT is NULL) AND (t0.OBJECT_CODE = RPAD(?, 15) OR t0.OBJECT_CODE = RPAD(?, 15))) ORDER BY t0.PAY_DATE ASC" withBindings: 1:0(sent), 2:"4040"(objectCode), 3:"4040"(objectCode)

=== Simplified
SELECT * FROM ACCOUNT t0
WHERE (t0.SENT = 0 OR t0.SENT is NULL) AND (t0.OBJECT_CODE = '4040' or t0.OBJECT_CODE = '4040') ORDER BY t0.PAY_DATE ASC _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 40global-village.net

This email sent to [EMAIL PROTECTED]


--
Coming in 2006 - an introduction to web applications using WebObjects and Xcode http://www.global-village.net/wointro

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to