Ticket #662 (closed defect: fixed)
Querying Experimenters produces strange results and exception
| Reported by: | jmoore | Owned by: | jmoore |
|---|---|---|---|
| Priority: | blocker | Milestone: | 3.0-Beta2 |
| Component: | Services | Version: | 3.0-Beta1 |
| Keywords: | queries, api, exception, iteration6 | Cc: | atarkowska, callan |
Description
Login l = new Login(...);
Server s = new Server(...);
ServiceFactory sf = new ServiceFactory(s,l);
List<Experimenter> list = sf.getQueryService().findAll(Experimenter.class, null);
System.out.println(list);
Set<Experimenter> set = new HashSet<Experimenter>(list);
System.out.println(set);
produces:
[Experimenter:Id_0, Experimenter:Id_4, Experimenter:Id_5, Experimenter:Id_5, Experimenter:Id_15, Experimenter:Id_15, Experimenter:Id_15, Experimenter:Id_15, Experimenter:Id_16, Experimenter:Id_16, Experimenter:Id_16, Experimenter:Id_17, Experimenter:Id_18, Experimenter:Id_18, Experimenter:Id_19, Experimenter:Id_21] [Experimenter:Id_4, Experimenter:Id_19, Experimenter:Id_21, Experimenter:Id_18, Experimenter:Id_15, Experimenter:Id_5, Experimenter:Id_0, Experimenter:Id_17, Experimenter:Id_16] PASSED: mageHasTooManyExperimenters
Then calling get on one of the duplicated ids produces:
sf.getQueryService().get(Experimenter.class, 15l); ome.conditions.InternalException: Wrapped Exception: (org.springframework.orm.hibernate3.HibernateSystemException): More than one row with the given identifier was found: 15, for class: ome.model.meta.Experimenter; nested exception is org.hibernate.HibernateException: More than one row with the given identifier was found: 15, for class: ome.model.meta.Experimenter
Change History
Note: See
TracTickets for help on using
tickets.
