I have the following Java 6 code:
Query q = em.createNativeQuery(
"select T.* " +
"from Trip T join Itinerary I on (T.itinerary_id=I.id) " +
"where I.launchDate between :start and :end " +
"or ADDDATE(I.launchDate, I.equipmentPullDayOfTrip) between :start and :end",
"TripResults" );
q.setParameter( "start", range.getStart(), TemporalType.DATE );
q.setParameter( "end", range.getEnd(), TemporalType.DATE );
@SqlResultSetMapping( name="TripResults",
entities={
@EntityResult( entityClass=TripEntity.class ),
@EntityResult( entityClass=CommercialTripEntity.class )
}
)
I receive a syntax error on the last closing right parenthesis. Eclipse gives: "Insert EnumBody to complete block statement" and "Insert enum Identifier to complete EnumHeaderName". Similar syntax error from javac.
What am I doing wrong?