Hi all,I've got some problems with the WO5.2.4 MySQLPlugIn it seems. I'm wondering if anyone else has come across them and what work-a-rounds were taken. Cheers.
-- Environment -- Deploying to WO5.2.4/MySQL 4.0.26 -- Verious Problems -- Building standard queries.... 1) NSMutableDictionary keyValues; EOQualifier qualifier; EOFetchSpecification fetchSpec; NSMutableDictionary keyValues = new NSMutableDictionary(); keyValues.takeValueForKey( firstName(), FirstNameKey ); keyValues.takeValueForKey( lastName(), LastNameKey ); keyValues.takeValueForKey( email(), EmailKey ); qualifier = EOQualifier.qualifierToMatchAllValues( keyValues ); fetchSpec = new EOFetchSpecification( "Person", qualifier, null );I get a JDBCAdaptorException: <com.webobjects.jdbcadaptor.MySQLPlugIn $MySQLExpression: "SELECT t0. FROM Person t0 WHERE (t0.email = ? AND t0.firstName = ? AND t0.lastName = ?" withBindings: 1:"[EMAIL PROTECTED]"(email), 2:"Bill"(firstName), 3:"Blog"(lastName)>: Next exceptionSQL State:42000 -- error code: 1064 -- msg: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM Student t0 WHERE (t0.email = '[EMAIL PROTECTED]' AND t0.f
Any ideas? 2) Figuring there must be a bug with the adaptor I then try:EOQualifier.qualifierWithQualifierFormat( "%@ = %@ caseInsensitiveLike %@ caseInsensitiveLike %@ AND %@ caseInsensitiveLike %@", new NSArray( new Object[] {
FirstNameKey, firstName(),
LastNameKey, lastName(),
EmailKey, email()
} ) );
But I get another JDBCAdaptorException:
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT t0.
FROM Person t0 WHERE (UPPER(t0.firstName) LIKE UPPER(?) ESCAPE '|'
AND UPPER(to.lastName) LIKE UPPER(?) ESCAPE '|' AND UPPER(t0.email)
LIKE UPPER(?) ESCAPE '|')" withBindings: 1: <..snip..>:
Next exception:SQL State:42000 -- error code: 1064 -- msg: You have
an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near 'FROM
Person t0 WHERE (UPPER(t0.firstName) LIKE UPPER('Bill'
The only thing that works is: StringBuffer format = new StringBuffer(); format.append( FirstNameKey + " caseInsensitiveLike %@" ); format.append( " " + LastNameKey + " caseInsensitiveLike %@" ); format.append( " " + EmailKey + " caseInsensitiveLike %@" );EOQualifier.qualifierWithQualifierFormat( format.toString(), new NSArray( new Object[] {
firstName(),
lastName(),
email()
} ) );
Any ideas?
with regards,
--
Lachlan Deck
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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]
