I'm currently using a Hibernate Criteria to return a list of results (filtering on various column values), but several of the objects have the same value for one of the attributes and I only need one "representative" for each.
For example: I am returned a list of 3 vehicle objects, with id/primary keys of 123, 456, 789, and manufacturer codes of: 111, 111, 222. I'd like to only have returned a list with two objects: 123/111, 789/222.
Is there a way to add a restriction to a Hibernate Criteria in order to return only unique (or first) result of the manufacturer code in this example? Please let me know if any additional info/clarification is needed.
Thanks for any suggestions!