[Biojava-l] BioJavaX-Hibernate: Namespace problem

Felix Dreher dreher at mpiib-berlin.mpg.de
Fri Feb 10 12:55:28 EST 2006


Hello,
I tried to create different virtual BioSQL-databases for the storage of 
different types of sequences. For testing purposes, I created and saved 
a new Namespace called 'mRNA'. I didn't find out though, how to save a 
newly created sequence inside this namespace.
I tried the following code block:

    Namespace nsp = new SimpleNamespace("mRNA");
    session.saveOrUpdate("Namespace", nsp);
    RichSequenceDB db = new BioSQLRichSequenceDB("mRNA", session);
    RichSequence seq = 
RichSequence.Tools.enrich(DNATools.createDNASequence("gattacagattaca","test"));
    db.addRichSequence(seq);
    tx.commit();

The Namespace and the sequence are actually being saved in the database, 
but the sequence is saved in the default namespace 'lcl' and not in the 
new namespace 'mRNA'.
Can someone tell me what I'm missing here?

Thanks in advance,
Felix


 

-- 
Felix Dreher
Max-Planck-Institute for Infection Biology
Campus Charité Mitte
Department of Immunology
Mailing address: Schumannstraße 21/22
Visitors: Virchowweg 12
10117 Berlin
Germany
Tel.: +49 (0)30 28460-254 / -494
Mobile: +49 (0)163 7542426



More information about the Biojava-l mailing list