JSONModel ForeignKey not null
I got an issue, when i try to save model with foreign key that has notNull condition equals true, ex:
@Column(columnType = Column.FOREIGN_KEY,
references = {@ForeignKeyReference(columnType = String.class, columnName = Columns.USERNAME_FK, foreignColumnName = User.Columns.USERNAME)}, notNull = true, saveForeignKeyModel = true)
ForeignKeyContainer
any hALP please?
@OptimistNot it appears the user_full_name was null. By setting nonNull() = true you cannot pass the field as null. So either before saving the object check for null or specify a onNullConflict()