[hibernate-issues] [Hibernate-JIRA] Created: (HSHARDS-45) A more generic implemintation for Max, Min projections

Aviad Lichtenstadt (JIRA) noreply at atlassian.com
Wed Aug 29 05:16:25 EDT 2007


A more generic implemintation for Max, Min projections
------------------------------------------------------

                 Key: HSHARDS-45
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-45
             Project: Hibernate Shards
          Issue Type: Bug
          Components: strategy
    Affects Versions: 3.0.0.Beta2
            Reporter: Aviad Lichtenstadt
            Assignee: Max Ross
         Attachments: MaxMinProjection.txt, MaxMinProjectionTest.txt

Today the Max/Min projections do not take into consideration the field upon they should be calculated.
to use these projections the object must Implement Comparable which limits the Projection to only one way of calculating it.
but the user does insert a field name to the projection and expects a different calculation for each field (as being doe in the database).
Applying here a new algorithm so there is no need to use only comparable Objects
I am offering to use the same methodology as used in the OrderExitOperation.
build our own comparable that fits the field name set in the projection
this should be done for both max and min operations

Attached are both:
a patch with the fix
a patch with the corrected test

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list