violates not-null constraint question.

From: WONDER (mmmmmmmmm5..eb.de)
Date: Sat Mar 11 2006 - 14:28:02 EST

  • Next message: Mike Kienenberger: "Re: violates not-null constraint question."

    Hello,

    CREATE TABLE account
    (
      id int4 NOT NULL,
      username varchar(50) NOT NULL,
      "password" varchar(100) NOT NULL,
      is_checked bool DEFAULT false,

    ...

    In the Model i have unchecked DbEntity.Mandatory for "is_active" to false.

    I get this error

    ERROR: null value in column "is_active" violates not-null constraint

    Is there any way to get arround this?

    I really dont know what sence does it make to send a NULL value to the DB as

    ----------------------------------------------------------------

    INSERT INTO public.account (id, inactive_username, is_active, is_checked,
    password, username) VALUES (?, ?, ?, ?, ?, ?)

    [batch bind: 47, NULL, NULL, 'false', '*****', 'XXXXX']

    ----------------------------------------------------------------

    It makes the default value technique useless, i hope there is way to disable
    this.

    Sako.



    This archive was generated by hypermail 2.0.0 : Sat Mar 11 2006 - 14:27:13 EST