#149: Support NOT NULL columns via @Column(notNull=true)#154
Draft
nvamelichev wants to merge 1 commit intomainfrom
Draft
#149: Support NOT NULL columns via @Column(notNull=true)#154nvamelichev wants to merge 1 commit intomainfrom
@Column(notNull=true)#154nvamelichev wants to merge 1 commit intomainfrom
Conversation
c1ea3c5 to
6233ef8
Compare
Defaulting ID fields to required (`NOT NULL`) can be enabled via a Java system property, `tech.ydb.yoj.repository.db.id.nullability`, which will influence the schema checker (`YdbSchemaCompatibilityChecker`), programmatic table creation via `YdbSchemaOperations`, and YQL code generation in `YqlStatement`s that take into account the `isOptional()` `JavaField` attribute. The new attribute is introduced by this change, so the only supporting code generators initially are the standard `YqlStatement` implementations. The valid System property values are: - `USE_COLUMN_ANNOTATION` (Default): Consider ID fields optional unless annotated with the `@Column(notNull=true, ...)` annotation or the `@NotNullColumn` meta-annotation. - `ALWAYS_NULL`: Force all ID fields to be treated as optional, even though YOJ does **not** allow to save entities with NULL in ID columns. - `ALWAYS_NOT_NULL`: Force all ID fields to be treated as required.
6233ef8 to
b852bd9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.