You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem that I have is that in the definition: fieldA's underlying column name is created_by, which matches the field name of the relationship field for created_by.
I've analyzed the generated query, and it queries perfectly.
The problem is with the shape generation..
so when the switch iterates over that AST, the shape definition for created_by with type === "table" is overwritten by the the definition for created_by with type === "column".
I have the following query:
The problem that I have is that in the definition:
fieldA
's underlying column name iscreated_by
, which matches the field name of the relationship field forcreated_by
.I've analyzed the generated query, and it queries perfectly.
The problem is with the shape generation..
The problem occurs in this switch here:
https://github.com/stems/join-monster/blob/master/src/define-object-shape.js#L17-L47
The switch assumes everything has a completely unique name, hence everything is writing into
fieldDefinition[child.fieldName]
.the generate SQL AST that runs through this function looks like this:
so when the switch iterates over that AST, the shape definition for
created_by
withtype === "table"
is overwritten by the the definition forcreated_by
withtype === "column"
.debug output:
The text was updated successfully, but these errors were encountered: