I am trying to use an ejb select method to return an OfferPriceHistoryLocal object from and OfferPriceLocal object with the MAX(dateModified).
Here is what I have so far:
/**
* @ejb.select
* query="SELECT OBJECT(oph) FROM OfferPrice op, IN(op.offerPriceHistory) AS oph WHERE oph.dateModified = (SELECT MIN(oph2.dateModified) FROM OfferPriceHistory AS oph2)"
*/
public abstract OfferPriceHistoryLocal ejbSelectLastHistory() throws FinderException;
This does not work. Can someone please offer a suggestion?