Re: Weird "like" instead of "=" in WO generated SQL Query
Re: Weird "like" instead of "=" in WO generated SQL Query
- Subject: Re: Weird "like" instead of "=" in WO generated SQL Query
- From: Chuck Hill <email@hidden>
- Date: Sun, 3 Dec 2006 22:01:00 -0800
Hi Dennis,
Enjoying the snow? :-(
I'd say that either you or WebObjects is to blame.
QualifierOperatorContains does not work on relationships evaluated at
the database layer. The good news is that qualifiers that do handle
this are available. These are the ones I use:
http://bernard-web.com/pierre/webobjects/code.html
Chuck
On Dec 3, 2006, at 2:41 PM, Gaastra Dennis - WO Lists wrote:
Dear List,
We get an error message when WO generates a weird SQL query:
SELECT t0."address_Additional", t0."address_City",
t0."address_City3C", t0."address_Country", t0."address_Line1",
t0."modify_date", t0."modify_user_id", t0."office_id" FROM "Client"
t0, "Branch_Client" T1, "Branch" T2 WHERE (t0."office_id" = 1000004
AND T2."branch_id" like 1000002) AND t0."client_id" =
T1."client_id" AND T1."branch_id" = T2."branch_id"
Results in:
"Next exception:SQL State:00 subclass = " -- error code: 208
-- msg: Semantic error 208. Expression in LIKE is not of type
CHARACTER."
Replacing the "like" with an "=" fixes the problem. However, this
SQL query is generated by WO, and needs to remain generated by WO.
Our code supplies two ANDed EOKeyValueQualifiers, one of them holds
the "QualifierOperatorContains" over a flattened M:N relationship;
the other one is just a regular QualifierOperatorEqual.
Question: Who is to blame: us, the Frontbase plugin, or
WebObjects? ... and how to fix this?
Thank you for you help.
With Kind Regards,
Dennis Gaastra, M.B.A.[sfu.ca], B.Sc.[ubc.ca]
Chief Technology Officer,
WEBAPPZ Systems, Inc.
HQ: (+1) 604.921.1333
Fax: (+1) 604.921.4313
Cell: (+1) 604.787.2532
Email: email@hidden
Web: www.webappz.com & www.1tracker.com
<logo.jpg>
<innovation.jpg>
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this e-
mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of e-mail
transmission. If verification is required please request a hard-
copy version. WEBAPPZ Systems, Inc., 726 - 1489 Marine Drive, West
Vancouver, BC, CANADA V7T 1B8, www.webappz.com
<logo.jpg>
<innovation.jpg>
_______________________________________________
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
--
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