1

What is the difference between setting nullok=false or true for the typekey field?

wuerfelfreak
  • 2,363
  • 1
  • 14
  • 29
Sss
  • 11
  • 1

3 Answers3

1

This means that field can contain Null values or not.

nullok = false -> do not allow null value nullok = true -> allow null values

Sam
  • 11
  • 1
1

Nullability of a column (nullok = true) makes it possible to persist the object even when the value for given field is missing.

Non-nullable column (nullok = false) does not allow missing values.

It should, however, be remembered, that this distinction is on the logical level and might not map directly to database limitations.

While a nullok=true column will always be nullable in the database, the nullok=false column is only non-nullable if the field is declared on the base (top level) entity. If the field comes from a subtype, the field on database level will still be technically nullable.

This is necessary because Guidewire keeps all the subtypes in a single table. A non-nullable column on a subtype would make it impossible to persist objects of subtypes that do not have related Property defined at all.

eliastion
  • 11
  • 1
0

When we set a Database Table Column to

NULLOK = FALSE, then that field should always have valid data or a default data written during every new record created or updated.

NULLOK = TRUE, then that field may or may not have valid data or a default data written during every new record created or updated.

Significance of the NULLOK : We can restrict integration code or backend process to update the database column with NULL value by setting the nullok = FALSE

Arun Kumar Mani
  • 337
  • 2
  • 7