[OS-JIRA] Created: (CAY-443) Validation on generated primary keys

From: jira-norepl..bjectstyle.org
Date: Tue Feb 07 2006 - 04:03:37 EST

  • Next message: jira-norepl..bjectstyle.org: "[OS-JIRA] Created: (CAY-444) Shared Cache does not refresh properly"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-443

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-443
        Summary: Validation on generated primary keys
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Versions:
                 1.2 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Dave Merrin

        Created: Tue, 7 Feb 2006 4:02 AM
        Updated: Tue, 7 Feb 2006 4:02 AM

    Description:
    The validation (validateForSave) in CayenneDataObject goes through all the ObjAttributes checking whether the mapped DbAttribute is mandatory. Unfortunately it doesn't check if the DbAttribute is generated. This means that mapping a generated primary key always results in failed saves.

    Could the line:

     if (dbAttribute.isMandatory()) {

    be changed to:

     if (dbAttribute.isMandatory() && (!dbAttribute.isGenerated())) {

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Tue Feb 07 2006 - 04:03:41 EST