We're Hiring!

HQL queries and other short examples

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Re: HQL queries and other short examples

Postby evenhuis » Tue Oct 02, 2018 12:38 pm

Hi Manics,

is this HQL magic or is this OMERO specific magic? Any documentation for this?

I'm still in the dark as how to join two tables.

The documentation here
https://docs.openmicroscopy.org/omero/5.4.0/developers/GettingStarted.html
suggests that the OMERO model from here
https://docs.openmicroscopy.org/omero/5.4.0/developers/Model/EveryObject.html
is enough to get started - but I'm finding this quite a leap.

How does one navigate around around the HQL entity mappings when building stringy queries in python?

I made an ERD of the psql database with DbVisualizer but it wasn't very useful. Is there some hibernate tool that maps the relationships?

Thanks,

Chris
evenhuis
 
Posts: 61
Joined: Tue Jan 30, 2018 4:47 am

Re: HQL queries and other short examples

Postby mtbc » Tue Oct 02, 2018 2:27 pm

Dear Chris,

You may find the join example at viewtopic.php?t=8596&p=20032 usefully illustrative. It seems that you already found the page that links to https://docs.jboss.org/hibernate/orm/3. ... yhql-joins and the other page from which you can click from https://docs.openmicroscopy.org/omero/5 ... html#image to details.owner to see firstName but depending on what you are doing you may also find that some of the administrative CLI plugins as at https://docs.openmicroscopy.org/omero/5 ... index.html can do pieces of what you want.

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Re: HQL queries and other short examples

Postby mtbc » Tue Oct 02, 2018 2:29 pm

Dear Chris,

I should add, the OME model does not (yet!) perfectly correspond to the OMERO model you are working with in HQL but nonetheless you may still find https://docs.openmicroscopy.org/latest/ ... rview.html to be a helpful overview.

Cheers,
Mark
User avatar
mtbc
Team Member
 
Posts: 282
Joined: Tue Oct 23, 2012 10:59 am
Location: Dundee, Scotland

Previous

Return to Developer Discussion

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron