cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-2101) DataContext.currentSnapshot() doesn't set snapshot entity name
Date Fri, 12 Aug 2016 15:16:20 GMT

     [ https://issues.apache.org/jira/browse/CAY-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andrus Adamchik updated CAY-2101:
---------------------------------
    Affects Version/s:     (was: 3.1.2)
                       3.1.1

> DataContext.currentSnapshot() doesn't set snapshot entity name
> --------------------------------------------------------------
>
>                 Key: CAY-2101
>                 URL: https://issues.apache.org/jira/browse/CAY-2101
>             Project: Cayenne
>          Issue Type: Bug
>    Affects Versions: 3.1.1, 4.0.M3
>            Reporter: Andrus Adamchik
>            Assignee: Andrus Adamchik
>
> DataContext.currentSnapshot() fails to set created snapshot entity name. This causes
confusion downstream. One obscure case that I was finally able to trace to this issue was
related to inheritance:
> * "currentSnapshot" was called for concrete subclass during new object commit.
> * returned snapshot ended up in the shared cache
> * later a RelationshipQuery for another object pointing to this one received the snapshot
from cache.
> * The result was the attempt to instantiate an abstract superclass instead of subclass

> So we need to fix 'currentSnapshot' and maybe also add sanity checks to "objectsFromDataRows"
to throw on invalid snapshots.



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

Mime
View raw message