FAQ
Incorrect logging when generated primary keys are used.
-------------------------------------------------------

Key: CAY-960
URL: https://issues.apache.org/cayenne/browse/CAY-960
Project: Cayenne
Issue Type: Bug
Components: Cayenne Core Library
Affects Versions: 3.0
Environment: All
Reporter: Michael Gentry
Assignee: Michael Gentry
Fix For: 3.0


With the logging changes, an INSERT will incorrectly log the primary key column when the value is generated (auto-increment/identity). This value must be obtained from the database after the INSERT has completed. The current code prints this column, but shows the next parameter value, skewing the entire logged entry after the primary key.

For auto-generated keys on INSERT-only (show key value on DELETE, SELECT, UPDATE), do not show the auto-generated key in the log (since it doesn't exist yet).



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

Search Discussions

  • Anonymous at Jan 15, 2008 at 8:25 pm
    [ https://issues.apache.org/cayenne/browse/CAY-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Michael Gentry resolved CAY-960.
    --------------------------------

    Resolution: Fixed

    Passed my test case, but want others to verify.


    Incorrect logging when generated primary keys are used.
    -------------------------------------------------------

    Key: CAY-960
    URL: https://issues.apache.org/cayenne/browse/CAY-960
    Project: Cayenne
    Issue Type: Bug
    Components: Cayenne Core Library
    Affects Versions: 3.0
    Environment: All
    Reporter: Michael Gentry
    Assignee: Michael Gentry
    Fix For: 3.0


    With the logging changes, an INSERT will incorrectly log the primary key column when the value is generated (auto-increment/identity). This value must be obtained from the database after the INSERT has completed. The current code prints this column, but shows the next parameter value, skewing the entire logged entry after the primary key.
    For auto-generated keys on INSERT-only (show key value on DELETE, SELECT, UPDATE), do not show the auto-generated key in the log (since it doesn't exist yet).
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Anonymous at May 10, 2008 at 4:21 pm
    [ https://issues.apache.org/cayenne/browse/CAY-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Michael Gentry closed CAY-960.
    ------------------------------


    Changing status from resolved to closed.
    Incorrect logging when generated primary keys are used.
    -------------------------------------------------------

    Key: CAY-960
    URL: https://issues.apache.org/cayenne/browse/CAY-960
    Project: Cayenne
    Issue Type: Bug
    Components: Cayenne Core Library
    Affects Versions: 3.0
    Environment: All
    Reporter: Michael Gentry
    Assignee: Michael Gentry
    Fix For: 3.0


    With the logging changes, an INSERT will incorrectly log the primary key column when the value is generated (auto-increment/identity). This value must be obtained from the database after the INSERT has completed. The current code prints this column, but shows the next parameter value, skewing the entire logged entry after the primary key.
    For auto-generated keys on INSERT-only (show key value on DELETE, SELECT, UPDATE), do not show the auto-generated key in the log (since it doesn't exist yet).
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedJan 15, '08 at 4:44p
activeMay 10, '08 at 4:21p
posts3
users1
websitecayenne.apache.org

1 user in discussion

Anonymous: 3 posts

People

Translate

site design / logo © 2022 Grokbase