Task #1225 (new)
Opened 16 years ago
Last modified 15 years ago
ITimeLine and most recent tags
Reported by: | atarkowska | Owned by: | jamoore |
---|---|---|---|
Priority: | major | Milestone: | Unscheduled |
Component: | General | Version: | 3.0-M1 |
Keywords: | n.a. | Cc: | |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | n.a. |
Sprint: | n.a. |
Description (last modified by jmoore)
ITimeline does not help to build tag cloud.
example query for Image only:
"select distinct ial.child from ImageAnnotationLink ial left outer join fetch ial.child join fetch ial.details.creationEvent where ial.child.ns is null order by ial.details.creationEvent desc"
Change History (6)
comment:1 Changed 16 years ago by atarkowska
comment:2 Changed 16 years ago by atarkowska
- Description modified (diff)
comment:3 Changed 16 years ago by jmoore
- Description modified (diff)
Probably the main difficulty here is the missing backlink in Hibernate from annotations to their annotationLinks. Maybe be necessary to formulate an SQL query which returns the link ids, which are then loaded via Hibernate.
Something like the following:
omero=# select distinct on (update_id, child) id, owner_id, update_id, parent, child from imageannotationlink order by update_id desc, child desc limit 20; id | owner_id | update_id | parent | child -----+----------+-----------+--------+------- 554 | 0 | 7694 | 954 | 455 553 | 0 | 7690 | 953 | 453 552 | 0 | 7687 | 952 | 452 551 | 0 | 7653 | 951 | 451 504 | 0 | 7613 | 904 | 405 503 | 0 | 7609 | 903 | 403 502 | 0 | 7606 | 902 | 402 501 | 0 | 7603 | 901 | 401 453 | 353 | 7288 | 867 | 345 450 | 353 | 7282 | 864 | 344 447 | 353 | 7276 | 863 | 341 446 | 353 | 7271 | 862 | 341 445 | 353 | 7265 | 861 | 340 443 | 353 | 7264 | 859 | 339 438 | 353 | 7255 | 857 | 337 434 | 353 | 7223 | 852 | 334 433 | 353 | 7218 | 851 | 333 429 | 353 | 7191 | 845 | 328 426 | 353 | 6558 | 776 | 325 425 | 353 | 6538 | 774 | 324 (20 rows)
which can be compared to:
omero=# select id, owner_id, update_id, parent, child from imageannotationlink order by update_id desc limit 20; id | owner_id | update_id | parent | child -----+----------+-----------+--------+------- 554 | 0 | 7694 | 954 | 455 553 | 0 | 7690 | 953 | 453 552 | 0 | 7687 | 952 | 452 551 | 0 | 7653 | 951 | 451 504 | 0 | 7613 | 904 | 405 503 | 0 | 7609 | 903 | 403 502 | 0 | 7606 | 902 | 402 501 | 0 | 7603 | 901 | 401 453 | 353 | 7288 | 867 | 345 450 | 353 | 7282 | 864 | 344 451 | 353 | 7282 | 865 | 344 447 | 353 | 7276 | 863 | 341 446 | 353 | 7271 | 862 | 341 445 | 353 | 7265 | 861 | 340 443 | 353 | 7264 | 859 | 339 444 | 353 | 7264 | 860 | 339 442 | 353 | 7264 | 858 | 339 438 | 353 | 7255 | 857 | 337 437 | 353 | 7255 | 856 | 337 434 | 353 | 7223 | 852 | 334 (20 rows)
See: http://www.postgresql.org/docs/7.4/interactive/sql-select.html#SQL-DISTINCT
comment:4 Changed 16 years ago by jmoore
- Milestone changed from OMERO-Beta4 to OMERO-Beta4.1
Pushing for the moment, Ola.
comment:5 Changed 15 years ago by jmoore
- Milestone changed from OMERO-Beta4.1 to OMERO-Beta4.2
comment:6 Changed 15 years ago by jmoore
- Milestone changed from OMERO-Beta4.2 to Unscheduled
test on r3945