Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vitulrana opened this issue Oct 16, 2020 · 0 comments
Open

Comments

@vitulrana
Copy link
Contributor

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,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant