Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple OMERO.tables picked randomly #106

Open
will-moore opened this issue Oct 6, 2022 · 2 comments
Open

Multiple OMERO.tables picked randomly #106

will-moore opened this issue Oct 6, 2022 · 2 comments

Comments

@will-moore
Copy link
Member

See https://forum.image.sc/t/multiple-omero-tables-crash-omero-parade/72477

Currently we do this in table_filters/data_providers.py, which picks a "random" table since _bulk_file_annotations() returns unsorted results from HQL query:

def get_table(conn, objtype, objid):
    data = _bulk_file_annotations(None, objtype, objid, conn=conn).get(
        'data', [])
    if len(data) < 1:
        return None
    # Just use the first Table we find
    # TODO: handle multiple tables!?
    data = data[0]

Simply need to sort by ID, then pick the highest ID (most recent).

NB: Supporting multiple OMERO.tables (as we do for csv) is a much bigger task

@imagesc-bot
Copy link

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/multiple-omero-tables-crash-omero-parade/72477/2

@Rdornier
Copy link

Rdornier commented Oct 7, 2022

NB: Supporting multiple OMERO.tables (as we do for csv) is a much bigger task

Sure, but it could very useful since OMERO.web now supportes multiple OMERO.tables at the dataset level, all being read in the "Table" tab of each image, that wasn't the case before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants