Hi
I'm trying to use Project Wonder Extensions ERXInQualifier().
public WOComponent MyAction()
{
NSLog.debug.setAllowedDebugLevel(NSLog.DebugLevelDetailed );
NSLog.allowDebugLoggingForGroups (NSLog.DebugGroupSQLGeneration | NSLog.DebugGroupDatabaseAccess);
EOEditingContext ec=session().defaultEditingContext();
symbolList = new NSMutableArray();
java.util.Enumeration enum = comLibraryList.objectEnumerator ();
while (enum.hasMoreElements())
{
LibraryRC currLib = (LibraryRC) enum.nextElement();
//symbolList.addObject(currLib.valueForKey("librarySymbol"));
//There is now two curLibs in my Entity so the following is added two times to the symbolList
symbolList.addObject("1");
symbolList.addObject("abcd");
symbolList.addObject("vsbcvs");
}
ERXInQualifier q = new ERXInQualifier("symbol", (NSArray)symbolList);
NSLog.out.appendln("My qualifier: "+q.toString());
EOSortOrdering symbolSortOrdering = EOSortOrdering.sortOrderingWithKey("symbol",EOSortOrdering.CompareAscending );
NSArray sortOrderings = new NSArray (new Object[] {symbolSortOrdering});
EOFetchSpecification libsInILLAndNotInCommon = new EOFetchSpecification("Library", q,null);
libraryList = ec.objectsWithFetchSpecification(libsInILLAndNotInCommon);
return null;
}
That results in the following log, q.toString show the right list values, but the sql generated behind convert them to NULL values
14869 [WorkerThread0] INFO NSLog - My qualifier: <er.extensions.ERXInQualifier key: symbol > IN '("1", "abcd", "vsbcvs", "1", "abcd", "vsbcvs")'
14872 [WorkerThread0] DEBUG NSLog - === Begin Internal Transaction
14874 [WorkerThread0] DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "SELECT t0.accept_public_requests_flag , t0.accept_responder_requests_flag, t0.address1_id, t0.address2_id, t0.address3_id, t0.allow_feedback_email_flag, t0.allow_feedback_mail_flag, t0.allow_feedback_phone_flag, t0.allow_pickup_item_flag, t0.allow_sending_item_flag , t0.close_date, t0.code_name, t0.id, t0.kind_of_library, t0.library_pool_id, t0.main_used_language, t0.name, t0.open_date, t0.open_flag, t0.requester_flag, t0.rero_member_flag , t0.provider_flag, t0.short_name, t0.symbol, t0.urls_id, t0.use_virtua_loan_module FROM library t0 WHERE t0.symbol IN (NULL, NULL, NULL, NULL, NULL, NULL)">
14891 [WorkerThread0] DEBUG NSLog - 0 row(s) processed
14892 [WorkerThread0] DEBUG NSLog - === Commit Internal Transaction
Does anyone have a cue about something I'am missing??? Or why are the string values converted to NULL???
Best regards
I'm trying to use Project Wonder Extensions ERXInQualifier().
public WOComponent MyAction()
{
NSLog.debug.setAllowedDebugLevel(NSLog.DebugLevelDetailed );
NSLog.allowDebugLoggingForGroups (NSLog.DebugGroupSQLGeneration | NSLog.DebugGroupDatabaseAccess);
EOEditingContext ec=session().defaultEditingContext();
symbolList = new NSMutableArray();
java.util.Enumeration enum = comLibraryList.objectEnumerator ();
while (enum.hasMoreElements())
{
LibraryRC currLib = (LibraryRC) enum.nextElement();
//symbolList.addObject(currLib.valueForKey("librarySymbol"));
//There is now two curLibs in my Entity so the following is added two times to the symbolList
symbolList.addObject("1");
symbolList.addObject("abcd");
symbolList.addObject("vsbcvs");
}
ERXInQualifier q = new ERXInQualifier("symbol", (NSArray)symbolList);
NSLog.out.appendln("My qualifier: "+q.toString());
EOSortOrdering symbolSortOrdering = EOSortOrdering.sortOrderingWithKey("symbol",EOSortOrdering.CompareAscending );
NSArray sortOrderings = new NSArray (new Object[] {symbolSortOrdering});
EOFetchSpecification libsInILLAndNotInCommon = new EOFetchSpecification("Library", q,null);
libraryList = ec.objectsWithFetchSpecification(libsInILLAndNotInCommon);
return null;
}
That results in the following log, q.toString show the right list values, but the sql generated behind convert them to NULL values
14869 [WorkerThread0] INFO NSLog - My qualifier: <er.extensions.ERXInQualifier key: symbol > IN '("1", "abcd", "vsbcvs", "1", "abcd", "vsbcvs")'
14872 [WorkerThread0] DEBUG NSLog - === Begin Internal Transaction
14874 [WorkerThread0] DEBUG NSLog - evaluateExpression: <com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: "SELECT t0.accept_public_requests_flag , t0.accept_responder_requests_flag, t0.address1_id, t0.address2_id, t0.address3_id, t0.allow_feedback_email_flag, t0.allow_feedback_mail_flag, t0.allow_feedback_phone_flag, t0.allow_pickup_item_flag, t0.allow_sending_item_flag , t0.close_date, t0.code_name, t0.id, t0.kind_of_library, t0.library_pool_id, t0.main_used_language, t0.name, t0.open_date, t0.open_flag, t0.requester_flag, t0.rero_member_flag , t0.provider_flag, t0.short_name, t0.symbol, t0.urls_id, t0.use_virtua_loan_module FROM library t0 WHERE t0.symbol IN (NULL, NULL, NULL, NULL, NULL, NULL)">
14891 [WorkerThread0] DEBUG NSLog - 0 row(s) processed
14892 [WorkerThread0] DEBUG NSLog - === Commit Internal Transaction
Does anyone have a cue about something I'am missing??? Or why are the string values converted to NULL???
Best regards
PHiLippe
_______________________________________________ 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]
