cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1245373 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
Date Fri, 17 Feb 2012 10:22:43 GMT
Author: oltka
Date: Fri Feb 17 10:22:43 2012
New Revision: 1245373

URL: http://svn.apache.org/viewvc?rev=1245373&view=rev
Log:
CAY-1660 added "supports generated keys" to Ingres

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java?rev=1245373&r1=1245372&r2=1245373&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/ingres/IngresAdapter.java
Fri Feb 17 10:22:43 2012
@@ -67,6 +67,7 @@ public class IngresAdapter extends JdbcA
             @Inject(EXTENDED_TYPE_FACTORY_LIST) List<ExtendedTypeFactory> extendedTypeFactories)
{
         super(runtimeProperties, defaultExtendedTypes, userExtendedTypes, extendedTypeFactories);
         setSupportsUniqueConstraints(true);
+        setSupportsGeneratedKeys(true);
     }
   
     @Override
@@ -156,6 +157,11 @@ public class IngresAdapter extends JdbcA
                 buf.append(')');
             }
         }
+        
+        
+        if (at.isGenerated()) {
+            buf.append(" GENERATED BY DEFAULT AS IDENTITY ");
+        }
 
         // Ingres does not like "null" for non mandatory fields
         if (at.isMandatory()) {



Mime
View raw message