Skip to content

Norm should Generate Params as Non Nullable for Non Nullable DB Fields #129

@vitulrana

Description

@vitulrana

Hi Team,

There is a small Issue with NORM Generated Files for UPDATE, INSERT and DELETE Queries. For the Params, it does not consider the Non-Nullability of Database Column rather it always Generate it as Nullable.

For Example -

If a query is INSERT INTO users (first_name, last_name) VALUES (:firstName, :lastName);

Generated Data Class would be like this

data class CreateUserParams(
  val firstName: String?,
  val lastName: String?,
)

But, Ideally it should be like this because in Database first_name and last_name are Non Nullable.

data class CreateUserParams(
  val firstName: String,
  val lastName: String,
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions