db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From proph...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/broker/metadata/auto AutoCreatorDb.java
Date Thu, 28 Nov 2002 20:40:09 GMT
prophecy    2002/11/28 12:40:09

  Modified:    src/java/org/apache/ojb/broker/metadata/auto
                        AutoCreatorDb.java
  Log:
  added auto increment check
  
  Revision  Changes    Path
  1.6       +8 -2      jakarta-ojb/src/java/org/apache/ojb/broker/metadata/auto/AutoCreatorDb.java
  
  Index: AutoCreatorDb.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/broker/metadata/auto/AutoCreatorDb.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AutoCreatorDb.java	28 Nov 2002 19:05:06 -0000	1.5
  +++ AutoCreatorDb.java	28 Nov 2002 20:40:09 -0000	1.6
  @@ -229,7 +229,13 @@
                           {
                               FieldDescriptor fieldDescriptor = fld[i];
                               String colname = fieldDescriptor.getColumnName();
  -                            ctq.addColumn(new Column(colname, fieldDescriptor.getColumnJdbcType()));
  +                            Column col = new Column(colname, fieldDescriptor.getColumnJdbcType());
  +                            // check if auto inc
  +                            if(fieldDescriptor.isAutoIncrement()){
  +                                col.setAutoIncrement(true);
  +                                
  +                            }
  +                            ctq.addColumn(col);
                           }
                           ctq.execute(st);
                           //System.out.println(ctq);
  
  
  

Mime
View raw message