You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Ari Maniatis (JIRA)" <de...@cayenne.apache.org> on 2007/10/29 10:49:52 UTC

[JIRA] Created: (CAY-909) Automatic AUTO_PK_SUPPORT row creation

Automatic AUTO_PK_SUPPORT row creation
--------------------------------------

                 Key: CAY-909
                 URL: https://issues.apache.org/cayenne/browse/CAY-909
             Project: Cayenne
          Issue Type: Improvement
          Components: Cayenne Core Library
            Reporter: Ari Maniatis
            Assignee: Andrus Adamchik
            Priority: Minor
             Fix For: 3.0


When a user of Cayenne adds new tables to their schema, they must currently remember to add a new row to the AUTO_PK_SUPPORT table for  primary keys managed by Cayenne. This should not be necessary if Cayenne could at startup read all rows of that table and automatically add any rows missing, or else capture the appropriate SQL error when trying to update the PK (and failing due to the missing row) and then automatically add the row and try again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[JIRA] Commented: (CAY-909) Automatic AUTO_PK_SUPPORT row creation

Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12571 ] 

Andrus Adamchik commented on CAY-909:
-------------------------------------

A few notes :

* My preference would be this implementation: "capture the appropriate SQL error when trying to update the PK (and failing due to the missing row) and then automatically add the row and try again." otherwise startup time can become a serious bottleneck (see the next comment why)

* we need to abstract the implementation to reset whatever PK generator the adapter is using (e.g. a sequence, AUTO_PK_SUPPORT, a stored procedure, etc.)...

* It would be nice to not only create the appropriate PK entry if missing, but also reset its max value on failures... IIRC there is another Jira somewhere with a similar request

> Automatic AUTO_PK_SUPPORT row creation
> --------------------------------------
>
>                 Key: CAY-909
>                 URL: https://issues.apache.org/cayenne/browse/CAY-909
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Cayenne Core Library
>            Reporter: Ari Maniatis
>            Assignee: Andrus Adamchik
>            Priority: Minor
>             Fix For: 3.0
>
>
> When a user of Cayenne adds new tables to their schema, they must currently remember to add a new row to the AUTO_PK_SUPPORT table for  primary keys managed by Cayenne. This should not be necessary if Cayenne could at startup read all rows of that table and automatically add any rows missing, or else capture the appropriate SQL error when trying to update the PK (and failing due to the missing row) and then automatically add the row and try again.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.