Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #882 (closed)

Opened 16 years ago

Closed 16 years ago

CollectionCount: loadContainerHierarchy

Reported by: jburel Owned by: jamoore
Priority: major Milestone: 3.0-Beta3
Component: API Version: 3.0-M3
Keywords: n.a. Cc:
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

When setting the root to Dataset
the count does not work for images contained in the dataset
i.e.
((ImageData?) object).getAnnotationsCounts(); always returns null

Change History (5)

comment:1 Changed 16 years ago by jmoore

Can you show me exactly what you're doing, because this:

    @Test(groups = "ticket:882")
    public void testDatasetImageCounts() throws Exception {
        long id = createImage();
        Set<IObject> ds = this.iPojos.findContainerHierarchies(Dataset.class,
                Collections.singleton(id), null);
        assertTrue(ds.size() == 1);
        Dataset d = (Dataset) ds.iterator().next();
        assertTrue(d.getImageLinksCountPerOwner() != null);
    }

throws this:

ome.conditions.ApiUsageException: Class parameter for findContainerHierarchies() must be in {Project,CategoryGroup}, not class ome.model.containers.Dataset
	at ome.logic.PojosImpl.findContainerHierarchies(PojosImpl.java:151)

comment:2 Changed 16 years ago by jburel

Confusion
the call that does not work is the one related to the annotation.

((ImageData) object).getAnnotationsCounts();
i.e.
asImage().getAnnotationLinksCountPerOwner(); 

comment:3 Changed 16 years ago by jmoore

Right. But we didn't specify that as something that should return non-null. The Hibernate workaround was only added to loadContainerHierarchy.

comment:4 Changed 16 years ago by jburel

  • Summary changed from CollectionCount: findContainerHierarchy to CollectionCount: loadContainerHierarchy

Sorry I wrote findContainerHierarchy
it is loadContainerHierarchy
The workaround does not seem to work.

comment:5 Changed 16 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.65768 sec.)

We're Hiring!