mysema/querydsl — Issue #111: CollectionQueries fail compiling evaluator classes due to protected or different named getter methods.
Author: HansiFransi404
Created: 2012-03-07 12:44:17+00:00
State: open

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