Hello
I have declared a sql query in an entity (Candidate):
@Sql(select= {
@SqlSelect(name="Candidate.FindAllCandidateWithRegistration",
query="SELECT
c.id, c.firstname, c.lastname, c.company, c.phone,
c.email from candidates c, registrations r WHERE r.candidate_id =
c.id",
debug=true
)
}
)
I call it like this:
List<Candidate> list = Ebean.createQuery(Candidate.class,
Candidate.FindAllCandidateWithRegistration").findList();
In the console, Ebean parses the query correctly, but findList()
fails, complaining that it is called on a null object.
So it looks like the Query object could not be created after all.
I have based my code on the PDF document (ebean doc v 1.1) chapter
3.1.2, though I am using ebean 1.2.
Do you spot any mistake in the way I have coded this?
THanks
Olivier