- Gel Version: 6.11
- Gel CLI Version: 7.8.0
This is obviously extremely minor. Flagging in case it is a hint of a bigger problem.
- default.gel has just
filter .is_active
$ gel migration create
warning: QueryError
┌─ /Users/jack/dev/app/dbschema/default.gel:1382:20
│
1382 │ filter .is_active
│ ^^^^^^^^^^ possibly more than one element returned by an expression in a FILTER clause
...
- uncomment, default.gel has
filter .is_active = true
$ gel migration create
did you alter...
The = true seems irrelevant here? Hence the weirdness
Schema:
type FoundationModel {
single link activePrice := (
select .<FoundationModel[is FoundationModelPrice]
filter .is_active # = true
order by .startDate desc
limit 1
);
}
type FoundationModelPrice {
required single link FoundationModel: FoundationModel;
required property startDate: datetime;
property endDate: datetime;
required property is_active := ((.startDate < datetime_of_statement() ) and ((not exists .endDate) or (.endDate > datetime_of_statement())) ?? false);
}