Can not sort on fields with private getters

Description

Build a criteria.
add order to the criteria
the order field should be one with only private getters and setters
an exception is thrown saying that there is no such method in the object

I am applying a patch that fixes this issue

Environment

hibernate 3.2.0

Activity

Show:
Aviad Lichtenstadt
August 28, 2007, 10:59 AM

The patch i attached contains some bugs:
it will be good only for methods declared in the object itself and not any method that belong to super class

i am attaching a patch to the patch that should resolve this issue.

it runs in a loop on the object and all the super hierarchy until the method is found.
in cases were the method is not found a NoSuchMethodException will be created and thrown.

Aviad Lichtenstadt
August 28, 2007, 11:00 AM

see my comment above

Max Ross
September 4, 2007, 4:25 AM

Thanks to Aviad for the patch!

Fixed

Assignee

Max Ross

Reporter

Aviad Lichtenstadt

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Minor
Configure