Similar to a problem we were having a few weeks back (working from  
hyb->sample) we'd now like to go back in the other direction. However  
whereas before we were going from a Hyb itemquery, linking to a  
labelled extract and using "l.parent.parent.id" to jump to sample I  
can't see any way to go in the other direction ("child.child" is  
essentially the function we need).
Am I missing something in the API? surely there must be a way to do  
something like this:


>               ItemQuery<net.sf.basedb.core.Sample> sampleQuery =  
> net.sf.basedb.core.Sample.getQuery();
>               sampleQuery.include(Include.SHARED);
>               sampleQuery.setDistinct(true);
>       
>
>               sampleQuery.join(Hql.innerJoin("sourceEvents",  
> Item.BIOMATERIALEVENT.getAlias()));
>
>               sampleQuery.restrict(
>                       new Restriction() {
>                               public String toQl(Query query, DbControl dc) {
>                                       return  
> "index("+Item.BIOMATERIALEVENT.getAlias()+") IN " +
>                                               "(SELECT b.id FROM 
> BioMaterialEventData b " +
>                                               " WHERE b.hybridization.id = 
> "+hybID+")";
>
>
>                                       }
>
>                               public Collection<? extends QueryElement> 
> getChildren() {
>                                       return null;
>                                       }
>                               }
>                       );
>                       

thanks

-s


-- 
Seth Redmond
   Scientific Programmer, VectorBase
   Kafatos / Christophides Groups
   Div. Cell and Molecular Biology
   Imperial College, London
[EMAIL PROTECTED]
--


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
basedb-devel mailing list
basedb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/basedb-devel

Reply via email to