テーブルにフィールドがあり、日付が格納されています。日付が 5 日であるすべてのレコードを選択したいと思います。
多くの調査の後、以下のコードを取得します。
Predicate dayValue = cb.equal(cb.function("day", Integer.class, test.<Date>get(Test_.dateInit)), now.get(Calendar.DAY_OF_MONTH) );
しかし、私は Oracle データベースを使用しており、関数の日はありません。
[EL Warning]: 2013-01-14 11:51:08.001--UnitOfWork(23011228)--Thread(Thread[main,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.2.v20101206-r8635): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00904: "DAY": invalid identifier
この選択を行う他の方法はありますか?
ありがとう