I would like to relate products temporal model to order_products model, based on the order model's timestamp, so the where clause in the has_one should be:
This is something that I am missing for a while. I cannot add a join condition with a relation. The 3rd parameter can only be some direct value, the query object does not try to parse it if it is a column name.
What do you suggest? Currently I set up Observer_Self and on after_load event I manually find the proper revision, but this means a lot more query. As this model contains the ordered products there are about five more queries for each order, so this is not a big problem, but is a bit ugly. :D
Possible solution would be using the required table name instead of the relation name, but MySQL does not support it.