Potential bug with relationship `parent` references
Bit of a gnarly one ahead...
I'm running onto what I think is a bug with
1. A resource called
2. A few calculations on
where
(continued in thread)
I'm running onto what I think is a bug with
parent in relationship filters. My setup looks something like this:1. A resource called
GuideLevel with a has_many relationship with no_attributes? true and a filter. This relationship is called ancestors and uses an AshPostgres.Ltree column to get the ancestors of the current record, although idt the ltree behavior is relevant to the bug. The filter expression looks like: filter expr(fragment("? @> ? AND ? < ?", level, parent(level), nlevel, parent(nlevel))). Note that this references an nlevel calculation which just calculates the nlevel of the ltree column: calculate :nlevel, :integer, expr(fragment("nlevel(?)", level))2. A few calculations on
GuideLevel that use a calculation module, which implements a sort of "inheritance" structure for a given setting on the GuideLevel. It looks like this:where
source_field is the source to pull the given setting from.(continued in thread)
