Re: EOModeler Generating Bad SQL
Re: EOModeler Generating Bad SQL
- Subject: Re: EOModeler Generating Bad SQL
- From: Michael Parlee <email@hidden>
- Date: Tue, 11 Nov 2003 06:20:03 -0800
That is not bad SQL. My understanding is that use of bind variables is
beneficial even for constant values. Constants (or literals) must be
parsed out of the statement. If you don't use a bind variable the
statement will require parsing each time it is executed. If a bind
variable is used, the statement is parsed only once
(http://miracleas.dk/tools/Miracle_2_cursor.pdf)
Mike
On Nov 10, 2003, at 11:35 PM, MadBrowser wrote:
> EOModeler WO 5.2.2 on Panther 10.3.1.
>
> I have the following qualifier:
> ((emailAddress = $emailAddress) and (password = $password) and
> (administratorStatus = 'yes'))
>
> This generates the following SQL:
> SELECT administrator_status, country, editor_status, email_address,
> first_name, last_name, password, quality_cost_preference, rec_num,
> street_address_1, street_address_2, us_city, us_state, username,
> wants_casino_offers, wants_newsletter, year_of_birth, zip_code FROM
> user_account WHERE (email_address = ? AND password = ? AND
> administrator_status = ?)
>
> Why is it trying to take administratorStatus as a variable when I am
> explicitly requiring that the field contain the value 'yes'?
>
> I have been fiddling with this and can't seem to figure this out.
>
> Am I doing something wrong or is this a bug?
>
> Thanks,
> Hunter
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.