You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Keith Bolam (Commented) (JIRA)" <ji...@apache.org> on 2012/02/07 12:26:59 UTC

[jira] [Commented] (CAY-1660) Ingres primary key generator doesn't work correctly with Ingres 10

    [ https://issues.apache.org/jira/browse/CAY-1660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202240#comment-13202240 ] 

Keith Bolam commented on CAY-1660:
----------------------------------

Hi, I have worked on the Ingres code for many years and am willing to assist you in modifying the Ingres open source code to enable a new option on the create sequence statement.  All create sequence statement options are valid for the identity column syntax. 

In the Cayenne code it would be a straight-forward task to amend the syntax to add a specific option to ensure there was a name.using

GENERATED BY DEFAULT AS [seq_name] IDENTITY 

e.g. 

* CREATE TABLE t2 (
* c2 INTEGER GENERATED ALWAYS AS pk_t2 IDENTITY ,
* c3 FLOAT); 

Keith
                
> Ingres primary key generator doesn't work correctly with Ingres 10
> ------------------------------------------------------------------
>
>                 Key: CAY-1660
>                 URL: https://issues.apache.org/jira/browse/CAY-1660
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Database integration
>    Affects Versions: 3.0.2
>         Environment: Ingres 10 (open source) on Linux (64 bit) (server), code running on FreeBSD 9 openjdk 6 + cayenne 3.0.2
>            Reporter: Lucas Holt
>            Priority: Minor
>
> I'm unable to create new objects using Cayenne due to problems using the sequence.  Later versions of Ingres added support for what they call identity columns.  They're similar to PostgreSQL serial columns and work with a sequence which is either system defined or specified by the user.  They're just an int column with a default of the sequence.  I'm certain the ingres pk generator needs to be changed, but I'm not sure what information is necessary to fix this problem in Ingres.  The default appears to be assuming that pk_table_name or similar is used.  Ingres seems to generate very odd sequence names with $ii as a prefix.
> http://docs.actian.com/ingres/10.0/sql-reference-guide/4813-identity-columns
> I suspect specifying a custom sequence name would get around this problem, but it would be nice if it were supported automatically and I'm willing to help.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira