Hi,

It's not too difficult - basically your querycustomizer gets called with
what it thinks is the query to run based on the collection-descriptor,
etc. Then you can add/adjust/replace the query it is going to perform
with something that suits better.

Very simple example (for this collection, get all A's where A.id_parent
is null)
    the customizer is set up on the collection descriptor for a's.

        ...
    public Query customizeQuery(Object anObject, PersistenceBroker
aBroker, CollectionDescriptor aCod, QueryByCriteria aQuery) {
        aQuery.getCriteria().addIsNull("id_parent");
        return aQuery;
    }
        ...

Good luck, 
Rob :)

> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of monish
> Sent: Friday, 30 January 2004 5:00 a.m.
> To: [EMAIL PROTECTED]
> Subject: Re: complex joins
> 
> 
> Reading the docn I suspect QueryCustomizer should be used 
> when the join criteria is anything other than equality (like <, >)
> 
> Can someone point me to the place to look examples 
> for this.
>  
> thanks
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to