[Biojava-l] Fwd: How to query 'value' in 'seqfeature_qualifier_value' using HQL

Richard Holland dicknetherlands at gmail.com
Wed May 28 13:57:47 UTC 2008


Forwarding this response to the list - i keep forgetting to hit
reply-all instead of reply...


---------- Forwarded message ----------
From: Richard Holland <dicknetherlands at gmail.com>
Date: 2008/5/28
Subject: Re: [Biojava-l] How to query 'value' in
'seqfeature_qualifier_value' using HQL
To: Gabrielle Doan <gabrielle_doan at gmx.net>


Hello. I think you want a query like this:

select feature.noteSet.note.value from Feature feature;

This is because Feature.xml has a collection of annotations, called
noteSet, which map to seqfeature_qualifier_value, which is the table
you are looking for. That collection consists of a number of entries,
each of which is a SimpleNote object called 'note' in the XML. Within
that you can see a property called 'value'.

If it doesn't work (I can't test it right now), some permutation of
the above will (try removing either noteSet or note). See
http://www.hibernate.org/hib_docs/reference/en/html/queryhql.html for
explanations on the select syntax.

In terms of lookup tables, yes it would be great if someone could
update the existing ones to also list out property names. Haven't got
time myself at present but if there are volunteers they would be
greatly appreciated.

cheers,
Richard


2008/5/28 Gabrielle Doan <gabrielle_doan at gmx.net>:
> Hi all,
>
> I am a newbie to BioJava so sorry if questions are too simple! I started
> working on BioJava and BioSQL using Hibernate and BioJavaX and met the
> following problem:
>
> I would like to query the property 'value' in 'seqfeature_qualifier_value'
> using HQL but don't have a clue how to do that.
> I have found at the BiojavaX Documentation the Hibernate
> object-relational mappings. At the table you can see that the BioSQL table
> 'seqfeature_qualifier_value' is mapped to the HQL name 'Feature'. That means
> if I want to get the 'seqfeature_qualifier_value' I have to use the
> properties of Features.
> I had a look at the xml mapping files, but unfortunately I could not find a
> solution for my problem.
>
> It would be very nice if there was a table in which I could see the
> properties of all HQL names so that I could see which properties I can
> actually query for. In BioSQL I can simply see the table's definition and
> know all such properties. The designated XML files are not very helpful to
> understand the mapping between BioSQL and HQL.
> I am grateful for any hints, which explain the properties of these HQL
> object names.
>
> Cheers,
>
> Gabrielle Doan
>
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biojava-l
>



More information about the Biojava-l mailing list