[Biojava-dev] biojavax stress test

Richard HOLLAND hollandr at gis.a-star.edu.sg
Sun Jan 15 21:34:10 EST 2006


Hi all.

Mark noticed some time ago that getMembers() didn't work, for exactly
the reason you state below - it cannot be guaranteed to return the
correct answer. So we removed it - the current biojava-live does not
have it and its gone from the javadocs too.

cheers,
Richard

Richard Holland
Bioinformatics Specialist
GIS extension 8199
---------------------------------------------
This email is confidential and may be privileged. If you are not the
intended recipient, please delete it and notify us immediately. Please
do not copy or use it for any purpose, or disclose its content to any
other person. Thank you.
---------------------------------------------


> -----Original Message-----
> From: mark.schreiber at novartis.com 
> [mailto:mark.schreiber at novartis.com] 
> Sent: Monday, January 16, 2006 10:32 AM
> To: Michael Heuer
> Cc: biojava-dev at biojava.org; Richard HOLLAND
> Subject: Re: [Biojava-dev] biojavax stress test
> 
> 
> >Finally, if I create the RichStreamReader with a null 
> Namespace, letting
> >the sequence files provide the namespace, I can retrieve the 
> persisted
> >Namespace and BioEntries using hibernate queries, but the 
> BioEntries are
> >not associated with the Namespace via the getMembers() 
> method as in the
> >biojavax docs.
> >
> >e.g.
> >
> >Query query = session.createQuery("from Namespace");
> >List namespaces = query.list();
> >for (Iterator i = namespaces.iterator(); i.hasNext(); )
> >{
> >  Namespace namespace = (Namespace) i.next();
> >  System.out.println("Namespace: " + namespace.getName());
> >
> > for (Iterator j = namespace.getMembers().iterator(); j.hasNext(); )
> >  {
> >    BioEntry bioEntry = (BioEntry) j.next();
> >    System.out.println("   BioEntry: " + bioEntry.getName());
> >  }
> >}
> >
> >returns
> >
> >Namespace: MyNamespace
> >
> >
> >whereas
> >
> >Query query = session.createQuery("from BioEntry");
> >List bioEntries = query.list();
> >for (Iterator i = bioEntries.iterator(); i.hasNext(); )
> >{
> >  BioEntry bioEntry = (BioEntry) i.next();
> >  System.out.println("BioEntry: " + bioEntry.getName() +
> >                     "  Namespace: " + bioEntry.getNamespace());
> >}
> >
> >returns
> >
> >BioEntry: 12345  Namespace: MyNamespace
> >BioEntry: 23456  Namespace: MyNamespace
> >...
> >
> >   michael
> >
> 
> Seems odd, it looks like Hibernate is not loading the contents of the 
> Namespaces on demand. Richard, is this some sort of lazy 
> loading issue?
> 
> - Mark
> 
> 
> 



More information about the biojava-dev mailing list