What was reported:
Issue geldata/gel#5883 (closed, 12 comments): - EdgeDB Version: 4.0-dev.7696+eae6d5a
- EdgeDB CLI Version: 3.5.0-dev.1025+fec3413
- OS Version: Linux hp 6.1.39-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 19 Jul 2023 17:58:31 +0000 x86_64 GNU/Linux
Steps to Reproduce:
1. `insert Foo { name := "f1" };`
2. `update Foo set { name := "f1" };`
```
InternalServerError: could not resolve trailing pointer class for (__derived__::__old__)
Hint: This is most likely a bug in EdgeDB. Please consider opening an issue ticket at https://github.com/edgedb/edgedb/issues/new?template=bug_report.md
```
Schema:
```
abstract type Revisable {
...
What works:
Comparing objects with `=` only compares ids, so to bump a revision only when properties actually changed, compare the unpacked JSON property sets:
rewrite update using (
(__old__.rev + 1)
if exists ((select json_object_unpack([json]__subject__{*})
except json_object_unpack([json]__old__{*})))
else __old__.rev
);
The maintainer confirmed this works for detecting property changes. Caveat from the thread: this is a workaround, not the idiomatic way. A proper structural comparison (something like `std::eq_properties()`) does not exist yet; it is tracked separately as issue #5335.