Task #308 (closed)
Opened 13 years ago
Closed 13 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 13 years ago by jmoore
comment:2 Changed 13 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 13 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(*)".
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.