Skip to content

Nullable columns #95

@arietto

Description

@arietto

Hello. I have the following table in PostgreSQL 9.5 DBMS
CREATE TABLE public.db_audit
(
id integer NOT NULL DEFAULT nextval('db_audit_id_seq'::regclass),
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone,
created_by integer,
updated_by integer,
CONSTRAINT entities_pkey PRIMARY KEY (id)
)
When I didn't fill created_by, updated_by columns for TSqlObject descendant, I had the following insert command in the log after commit:
INSERT INTO db_audit ("created_at", "updated_at", "created_by", "updated_by") VALUES (TIMESTAMP WITH TIME ZONE '2016-10-16T18:44:11.378Z', TIMESTAMP WITH TIME ZONE '2016-10-16T18:44:11.378Z', -2147483648, -65536).
Why do I have -2147483648, -65536 values? I expected null values. What is the workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions