New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionQueries fail compiling evaluator classes due to protected or different named getter methods. #111

Closed
HansiFransi404 opened this Issue Mar 7, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@HansiFransi404

Hi,
I have the following classes where I create query classes using the maven plugin / HibernateAnnotationProcessor:

@entity
@access(FIELD)
public class StateHistoryOwner {

@OneToOne
private StateHistory stateHistory;


protected final StateHistory getStateHistory() {
    if (stateHistory == null) {
        return new StateHistory();
    }
}

}

@entity
@access(FIELD)
public class StateHistory {

@Temporal(TemporalType.TIMESTAMP)
private Date changedAt;

public final void getChangedAtTime() {
    return changedAt;
}

}

I want to use these query classes for Collection queries too. But the classes generated in memory by class DefaultEvaluatorFactory do not compile, as they try to call the protected "getStateHistory()" method on the first class, and the non existing method "getChangedAt()" on the second class.

Yours
hw

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Mar 9, 2012

Member

The search order for property access is now

  • public getter, if available, or
  • public field, if available, or
  • field via reflection
Member

timowest commented Mar 9, 2012

The search order for property access is now

  • public getter, if available, or
  • public field, if available, or
  • field via reflection
@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Mar 11, 2012

Member

released in 2.3.3

Member

timowest commented Mar 11, 2012

released in 2.3.3

@timowest timowest closed this Mar 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment