- Gel Version: 7.1+ec15259
- Gel CLI Version: Gel CLI 7.7.0+3788f53
- OS Version: Ubuntu 24.04.2 LTS
Steps to Reproduce:
Insert multiple data into B and C. Run following with proper parameter:
with
t := assert_exists(select A filter .id = <uuid>$a),
b := <uuid>$b,
c := assert(t.f = b)
select c;
This raises AssertError, however
with
t := assert_exists(select A filter .id = <uuid>$a),
b := <uuid>$b,
c := (t.f = b)
select c;
Returns { true } as expected.
The following workaround works
with
t := assert_exists(select A filter .id = <uuid>$a),
f := assert_single(t.f),
b := <uuid>$b,
c := assert(assert_exists(f, message := <str>f) = b)
select c;
I don't know why, but I've found that passing message is important to make assert pass.
Schema:
The schema used in my project is complex, but the core is as follows:
default.gel
module default {
abstract type A {
required f: uuid {
default := uuid_generate_v1mc();
}
}
type B extending A { }
type C extending A { }
}
Steps to Reproduce:
Insert multiple data into
BandC. Run following with proper parameter:This raises
AssertError, howeverReturns
{ true }as expected.The following workaround works
I don't know why, but I've found that passing message is important to make
assertpass.Schema:
The schema used in my project is complex, but the core is as follows:
default.gel