chronomodel
chronomodel copied to clipboard
GlobalID may have an issue with historical objects fetched via `as_of`
It is not clear to me what is the correct behavior, but it is worth to mention the following:
Vendor.last.history.last.model_name.name
"Vendor::History"
Vendor.history.last.to_gid
#<GlobalID:0x00007fd3ba2ed9f8 @uri=#<URI::GID gid://app/Vendor::History/123>>
Vendor.as_of(1.day.ago).last.model_name.name
"Vendor"
Vendor.as_of(1.day.ago).last.to_gid
#<GlobalID:0x00007fd3bac4ba18 @uri=#<URI::GID gid://app/Vendor/1>>