Thank you Hugi,
Yes, that resolves my problem. This helps a lot!
Andrew
-Original Message-
From: Hugi Thordarson [mailto:h...@karlmenn.is]
Sent: Wednesday, June 22, 2016 11:54 AM
To: user@cayenne.apache.org
Subject: Re: Effective dated records
Hi Andrew.
If I understand your problem
Hi Andrew.
If I understand your problem correctly you should be able to achieve this by
setting a fetch limit of 1 on your query and sorting by date in descending
order. It's the same as adding LIMIT to an SQL statement.
For example, let’s assume you record the movement of paintings in an entity
Is there a formal Cayenne approach to retrieving an effective dated record?
At the moment my approach with SelectQuery is to request all records dated
prior to a given date, then on the returned entities, loop through and find the
most recent one. Alternatively, the correlated subquery could be