You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/22 11:22:58 UTC

[jira] [Commented] (CAY-2146) Vertical inheritance: record still inserted into parent db table when child validation fails

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

ASF GitHub Bot commented on CAY-2146:
-------------------------------------

GitHub user stariy95 opened a pull request:

    https://github.com/apache/cayenne/pull/137

    CAY-2146 Vertical inheritance: record still inserted into parent db table when child validation should fail

    Changed logic of method CayenneDataObject.validateForSave().
    It can now validate mandatory object relationships with two db relationships in them.
    Previous version just skipped this type of relationships.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stariy95/cayenne CAY-2146

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #137
    
----
commit 2df9ae8f69a4f50d597f2afa58a205783882a21d
Author: Nikita Timofeev <st...@gmail.com>
Date:   2016-11-18T09:33:33Z

    CAY-2146
    Vertical inheritance: record still inserted into parent db table when child validation fails

commit 7fbcc016c6425d539dc33a25165992d9b1f31cb6
Author: Nikita Timofeev <st...@gmail.com>
Date:   2016-11-22T11:14:48Z

    Merge branch 'master' into CAY-2146
    
    # Conflicts:
    #	docs/doc/src/main/resources/RELEASE-NOTES.txt

----


> Vertical inheritance: record still inserted into parent db table when child validation fails
> --------------------------------------------------------------------------------------------
>
>                 Key: CAY-2146
>                 URL: https://issues.apache.org/jira/browse/CAY-2146
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 4.0.M3
>            Reporter: Dzmitry Kazimirchyk
>            Assignee: Nikita Timofeev
>         Attachments: vertical_inheritance_missing_child_test.patch
>
>
> When using vertical inheritance, if a child record has a mandatory relationship which is not set, commit will still go through without any errors. However, in database it will create only a record in the parent table without a corresponding child record.
> Attaching patch with a unit test demonstrating the issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)