#539 Can't insert new record in editable mode

2.5.1
closed-invalid
Core (462)
5
2007-10-27
2007-08-23
Anonymous
No

When I go in the content tab, make it editable, then try to insert a record, i get the error:

Attempt to modify an identity column 'ID'.

My database is in Derby.
The table in the example screen shot is created with this statement:

"CREATE TABLE action ("+
"ID INT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1,INCREMENT BY 1),"+
"ActionID SMALLINT NOT NULL default 0,"+
"TimeAction BIGINT NOT NULL default 0,"+
"DescAction LONG VARCHAR NOT NULL default '',"+
"Section SMALLINT NOT NULL default 0,"+
"CPUID SMALLINT NOT NULL default 0,"+
"PRIMARY KEY (ID)"+
")";

Is it an error or am I doing something wrong?

Thank you.

Xavier Lavoie
xlavoie@hotmail.com

Discussion

  • Nobody/Anonymous

    Screen Shot

     
  • Rob Manning

    Rob Manning - 2007-10-27
    • labels: --> Core
    • milestone: --> 2.5.1
    • assigned_to: nobody --> manningr
    • status: open --> closed-invalid
     
  • Rob Manning

    Rob Manning - 2007-10-27

    Logged In: YES
    user_id=1287991
    Originator: NO

    Xavier,

    I can reproduce this problem on 10.1.2.1 version of Derby. It has to do with a bug in the Derby JDBC which mis-characterizes the ID column by returning false for isAutoIncrement().

    In Derby 10.3.1.4, the driver no longer misrepresents this column, and so when you edit in SQuirreL it succeeds because SQuirreL knows to exclude auto-increment columns when updating or inserting records.

    Rob

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks