However, I get an SQL error about ambiguous table/alias Revision. If I load it in two steps, it works fine. I could change the name of the second Revisions association to LatestRevisions but that wouldn’t be correct in all cases (e.g. when I actually do want all the revisions). I was wondering whether this might call for a bug report?
Revisions belongsTo Posts is joinable, and Posts hasOne Revisions is joinable too, so both will end up in the same query, and that will not work as you cannot use the same alias more than once.
You can either create an additional association (no need to replace), like LastRevisions as you mentioned, or you can change the association’s strategy to select, which will cause the records to be fetched in a separate query instead of via a join. This can be done on association level via the strategy option/setter: