Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ロギング機能に取り組んでいますが、データストアに最後の 200 レコードのみを保持したいと考えています。
JDOQLでこれを行うにはどうすればよいですか?
SQLを使用する場合、次のように簡単になります
DELETE FROM MyTable OFFSET 201 ORDER BY myDate DESC、
DELETE FROM MyTable OFFSET 201 ORDER BY myDate DESC
しかし、 JDOQLに似たものを見つけるのに苦労しています。
Query q = pm.newQuery("SELECT FROM mydomain.MyClass ORDER BY myDate DESC RANGE 201"); q.deletePersistentAll()
私にとても似ている