这是indexloc提供的服务,不要输入任何密码
Skip to content

Column Presets not working in Sql Server #8221

@m4ttheweric

Description

@m4ttheweric

Version Information

Server Version: 2.3.0-beta.2 and beta.1

Environment

Core / sql server

What is the expected behaviour?

When configuring a column preset, that it would use that preset...

Keywords

column presets, sql server

What is the current behaviour?

When you set a preset either using a server variable like x-hasura-user-id or even a hard coded value, it does not work and produces an error.

The error in my case is a rejected insert because of a constraint violation b/c the column in question cannot insert a NULL value. This error occurs because the preset is not part of the insert script generated by the insert mutation.

I am not sure if perhaps the preset is supposed to be invoked after the insert? But whatever the case, my mutations are failing. Since the column preset disallows inserting into that column, it of course doesn't show up as a column I can provide a value for. And without an value for the insert either manually provided or via the preset then the query fails.

Error is : Integrity constraint violation. [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Cannot insert the value NULL into column 'UserId', table 'answr.Messaging.ConversationMessage'; column does not allow nulls. INSERT fails.

Screen Shots:

Here's the column preset setup screen:
Screen_Shot_2022-02-17_at_12-1 59 08_PM

Here's what happens when trying to run an insert:
Screen_Shot_2022-02-17_at_12-1 59 30_PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    k/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions