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 #308 (closed)

Opened 18 years ago

Closed 18 years ago

count option

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

Description

Pojos Service
the count option for all methods doesn't work
The value returned is always 0.

Change History (3)

comment:1 Changed 18 years ago by jmoore

Were you able to determine when this broke, Jean-Marie? If it's on the server-side, then most likely it had something to do with the changes to trunk/components/server/src/ome/logic/PojosImpl.java. Could it have been as long ago as 6/23. This was a change in the Hibernate libraries.

comment:2 Changed 18 years ago by jmoore

From trunk/components/client/test/ome/adapters/pojos/itests/PojosServiceTest.java:

    @Test
    public void test_counts() throws Exception
    {
        Map counts;
        
        counts = getCounts( Dataset.class, fixture.du7770.getId(), null );
        assertNull( counts );

        PojoOptions po = new PojoOptions().leaves();
        counts = getCounts( Dataset.class, fixture.du7770.getId(), po.map() );
        assertTrue( counts == null || null == counts.get( Image.ANNOTATIONS ));
        assertTrue( counts == null || null == counts.get( Dataset.ANNOTATIONS ) );
        
        counts = getCounts( Dataset.class, fixture.du7771.getId(), null );
        assertNull( counts.get( Image.ANNOTATIONS ));
        assertTrue( counts.containsKey( Dataset.ANNOTATIONS ));
        assertTrue( ( (Long) counts.get( Dataset.ANNOTATIONS) ).intValue() == 1 );
                
    }

passes. Can you try a simple test from Shoola and see if you can reproduce? What are you passing in for PojoOptions??

comment:3 Changed 18 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

r899 fixes. It was in the DataObject.getCount method which checked for an Integer. Hibernate 3.2 began using Longs for the results of "select count(*)".

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.69297 sec.)

We're Hiring!