• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't find records in Oracle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't find records in Oracle?


  • Subject: Re: Can't find records in Oracle?
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 16 May 2006 13:21:21 -0700

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@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--
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@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Can't find records in Oracle? (From: Marc Respass <email@hidden>)

  • Prev by Date: Can't find records in Oracle?
  • Next by Date: Re: Inheritance Problem
  • Previous by thread: Can't find records in Oracle?
  • Next by thread: WebAssistant not working any longer
  • Index(es):
    • Date
    • Thread