chronomodel
chronomodel copied to clipboard
The 'as_of_time' value for historical objects is inaccurate and may lead to unintended consequences
Same issue as #283, since as_of_time
is an alias of valid_to
in historical objects, but may have different effects
> country.history.first.validity
Country::History Load (1.2ms) SELECT "history"."countries".* FROM "history"."countries" WHERE "history"."countries"."id" = $1 ORDER BY lower(validity) ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
=> 2024-04-14 07:33:14.750087 UTC...2024-04-14 07:35:30.80794 UTC
country.history.first.as_of_time
Country::History Load (1.3ms) SELECT "history"."countries".* FROM "history"."countries" WHERE "history"."countries"."id" = $1 ORDER BY lower(validity) ASC LIMIT $2 [["id", 1], ["LIMIT", 1]]
=> 2024-04-14 07:35:30.80794 UTC
2024-04-14 07:35:30.80794 UTC
IS NOT included in the validity range of country