Re: Searching for non-empty toMany relationships...
Re: Searching for non-empty toMany relationships...
- Subject: Re: Searching for non-empty toMany relationships...
- From: Chuck Hill <email@hidden>
- Date: Wed, 17 Jul 2013 11:42:53 -0700
Hi Louis,
On 2013-07-17, at 11:22 AM, Louis Demers wrote:
> Hi,
>
> I'm trying to create an EOQualifer to filter and array where I have only the EOs that have a toMany relationship not empty. I tried many things, including a thread "qualifier to check for empty toMany" of May 11, 2011 without success.
I think maybe you want the ERXExistsQualifier. I don't think there is an ERQ short-hand for that one.
Chuck
> My code was
>
> ERXQ.isNotNull(Transaction.COMPONENT_TRANSACTIONS_KEY + "." + Transaction.PK_KEY)
>
> I then tried what I thought was the most promising ERXQ.hasAtLeast
>
> ERXQ.hasAtLeast(Transaction.COMPONENT_TRANSACTIONS_KEY, null, 1)
>
> componentTransactions being my modelled toMany relationship. The doc says that the array can be null.
>
>
>
> but I get the following exception at run-time which surprised me a bit. I run latest Wonder (integration) and PostgreSQL as my database. Inspecting the code seems to poin to having a badly defined joins which brings me in my ignorance zone about inner/outer/upper/sideway joins....
> Pointers to a tutorial on those would be appreciated.
>
>
> Even a solution based upon straight SQL would make me happy 8-).
>
>
> Application: Alexandria
> Error: java.lang.RuntimeException: not implemented!!
> Reason: not implemented!!
> Stack trace:
> File Line# Method Package
> ERXToManyQualifier.java 234 sqlStringForSQLExpression er.extensions.eof.qualifiers
> EOQualifierSQLGeneration.java 165 _sqlStringForSQLExpression com.webobjects.eoaccess
> EOSQLExpression.java 1528 sqlStringForArrayOfQualifiers com.webobjects.eoaccess
> EOSQLExpression.java 1560 sqlStringForConjoinedQualifiers com.webobjects.eoaccess
> EOQualifierSQLGeneration.java 541 sqlStringForSQLExpression com.webobjects.eoaccess
> EOQualifierSQLGeneration.java 165 _sqlStringForSQLExpression com.webobjects.eoaccess
> EOSQLExpression.java 1528 sqlStringForArrayOfQualifiers com.webobjects.eoaccess
> EOSQLExpression.java 1574 sqlStringForDisjoinedQualifiers com.webobjects.eoaccess
> EOQualifierSQLGeneration.java 578 sqlStringForSQLExpression com.webobjects.eoaccess
> EOQualifierSQLGeneration.java 165 _sqlStringForSQLExpression com.webobjects.eoaccess
> EOSQLExpression.java 1528 sqlStringForArrayOfQualifiers com.webobjects.eoaccess
> EOSQLExpression.java 1560 sqlStringForConjoinedQualifiers com.webobjects.eoaccess
> EOQualifierSQLGeneration.java 541 sqlStringForSQLExpression com.webobjects.eoaccess
> EOQualifierSQLGeneration.java 165 _sqlStringForSQLExpression com.webobjects.eoaccess
> EOSQLExpression.java 997 prepareSelectExpressionWithAttributes com.webobjects.eoaccess
> JDBCExpression.java 146 prepareSelectExpressionWithAttributes com.webobjects.jdbcadaptor
> PostgresqlExpression.java 770 prepareSelectExpressionWithAttributes com.webobjects.jdbcadaptor
> EOSQLExpressionFactory.java 225 selectStatementForAttributes com.webobjects.eoaccess
> JDBCChannel.java 213 selectAttributes com.webobjects.jdbcadaptor
> EODatabaseChannel.java 897 _selectWithFetchSpecificationEditingContext com.webobjects.eoaccess
> EODatabaseChannel.java 234 selectObjectsWithFetchSpecification com.webobjects.eoaccess
> EODatabaseContext.java 3055 _objectsWithFetchSpecificationEditingContext com.webobjects.eoaccess
> EODatabaseContext.java 3195 objectsWithFetchSpecification com.webobjects.eoaccess
> EOObjectStoreCoordinator.java 488 objectsWithFetchSpecification com.webobjects.eocontrol
> EOEditingContext.java 4069 objectsWithFetchSpecification com.webobjects.eocontrol
> ERXEC.java 1308 objectsWithFetchSpecification er.extensions.eof
> EOEditingContext.java 4444 objectsWithFetchSpecification com.webobjects.eocontrol
> _Transaction.java 604 fetchTransactions com.obzerv.eo
> Transaction.java 112 wipTransactions com.obzerv.eo
> PeriodFinancialReportTask.java 91 call com.obzerv.task
> PeriodFinancialReportTask.java 1 call com.obzerv.task
> FutureTask.java 303 innerRun java.util.concurrent
> FutureTask.java 138 run java.util.concurrent
> ThreadPoolExecutor.java 895 runTask java.util.concurrent
> ThreadPoolExecutor.java 918 run java.util.concurrent
> Thread.java 680 run java.lang
> NA : Non applicable, JIT activated
>
>
>
>
> Louis Demers eng.
> www.obzerv.com
>
>
> _______________________________________________
> 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
--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services
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/gvc/practical_webobjects
Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C!
Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!
_______________________________________________
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