You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Ksenia Khailenko (JIRA)" <ji...@apache.org> on 2010/02/24 17:24:28 UTC

[jira] Created: (CAY-1397) ROP: Missing the COMMIT state when deleting HOLLOW object

ROP: Missing the COMMIT state when deleting HOLLOW object
---------------------------------------------------------

                 Key: CAY-1397
                 URL: https://issues.apache.org/jira/browse/CAY-1397
             Project: Cayenne
          Issue Type: Bug
          Components: ROP
    Affects Versions: 3.0RC2
            Reporter: Ksenia Khailenko


When deleting persistent object at HOLLOW state, it changes the state to DELETED without resolving 

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


[jira] Closed: (CAY-1397) ROP: Missing the COMMIT state when deleting HOLLOW object

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik closed CAY-1397.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0RC3

> ROP: Missing the COMMIT state when deleting HOLLOW object
> ---------------------------------------------------------
>
>                 Key: CAY-1397
>                 URL: https://issues.apache.org/jira/browse/CAY-1397
>             Project: Cayenne
>          Issue Type: Bug
>          Components: ROP
>    Affects Versions: 3.0RC2
>            Reporter: Ksenia Khailenko
>             Fix For: 3.0RC3
>
>         Attachments: 0001-Fixed-not-resolving-of-hollow-objects-before-deleting.patch
>
>
> When deleting persistent object at HOLLOW state, it changes the state to DELETED without resolving 

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


[jira] Updated: (CAY-1397) ROP: Missing the COMMIT state when deleting HOLLOW object

Posted by "Ksenia Khailenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ksenia Khailenko updated CAY-1397:
----------------------------------

    Attachment: 0001-Fixed-not-resolving-of-hollow-objects-before-deleting.patch

> ROP: Missing the COMMIT state when deleting HOLLOW object
> ---------------------------------------------------------
>
>                 Key: CAY-1397
>                 URL: https://issues.apache.org/jira/browse/CAY-1397
>             Project: Cayenne
>          Issue Type: Bug
>          Components: ROP
>    Affects Versions: 3.0RC2
>            Reporter: Ksenia Khailenko
>         Attachments: 0001-Fixed-not-resolving-of-hollow-objects-before-deleting.patch
>
>
> When deleting persistent object at HOLLOW state, it changes the state to DELETED without resolving 

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


[jira] Commented: (CAY-1397) ROP: Missing the COMMIT state when deleting HOLLOW object

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837916#action_12837916 ] 

Robert Zeigler commented on CAY-1397:
-------------------------------------

Yeah, I started thinking about it more after I posted and started thinking about scenarios where it would be necessary, so, I agree with your (and the original poster's) assessment as "bug". 

> ROP: Missing the COMMIT state when deleting HOLLOW object
> ---------------------------------------------------------
>
>                 Key: CAY-1397
>                 URL: https://issues.apache.org/jira/browse/CAY-1397
>             Project: Cayenne
>          Issue Type: Bug
>          Components: ROP
>    Affects Versions: 3.0RC2
>            Reporter: Ksenia Khailenko
>         Attachments: 0001-Fixed-not-resolving-of-hollow-objects-before-deleting.patch
>
>
> When deleting persistent object at HOLLOW state, it changes the state to DELETED without resolving 

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


[jira] Commented: (CAY-1397) ROP: Missing the COMMIT state when deleting HOLLOW object

Posted by "Robert Zeigler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837856#action_12837856 ] 

Robert Zeigler commented on CAY-1397:
-------------------------------------

I'm not sure this is a bug?

HOLLOW => object is backed by a persistent row, but hasn't been fully fetched yet (just the id)
COMMIT => the state just after a commit, before any additional modifications (including delete) occur
DELETED => the state when an object has been marked for deletion.

If you've just fetched the id of an object, it's not COMMIT, it's HOLLOW. If you then mark the object for deletion without performaing any action first that would trigger the resolution of the object's properties, it shouldn't ever be in the COMMIT state; it should be DELETED. 

What behavior are you trying to implement that requires a DELETED object to first be resolved?

> ROP: Missing the COMMIT state when deleting HOLLOW object
> ---------------------------------------------------------
>
>                 Key: CAY-1397
>                 URL: https://issues.apache.org/jira/browse/CAY-1397
>             Project: Cayenne
>          Issue Type: Bug
>          Components: ROP
>    Affects Versions: 3.0RC2
>            Reporter: Ksenia Khailenko
>
> When deleting persistent object at HOLLOW state, it changes the state to DELETED without resolving 

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


[jira] Commented: (CAY-1397) ROP: Missing the COMMIT state when deleting HOLLOW object

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12837906#action_12837906 ] 

Andrus Adamchik commented on CAY-1397:
--------------------------------------

Robert, this is a bug. If you delete an object but try to read its fields after delete but before commit they come back as NULL , with no attempt to resolve the object. Object state may be needed for callbacks, etc. Also DataContext does resolve an object before deletion already, while ROP CayenneContext does not. So there is an inconsistency.

Now an ideal solution would've been an extra persistence state (HOLLOW_DELETED), but for the time being reconciling ROP and server-side Cayenne seems reasonable.

> ROP: Missing the COMMIT state when deleting HOLLOW object
> ---------------------------------------------------------
>
>                 Key: CAY-1397
>                 URL: https://issues.apache.org/jira/browse/CAY-1397
>             Project: Cayenne
>          Issue Type: Bug
>          Components: ROP
>    Affects Versions: 3.0RC2
>            Reporter: Ksenia Khailenko
>         Attachments: 0001-Fixed-not-resolving-of-hollow-objects-before-deleting.patch
>
>
> When deleting persistent object at HOLLOW state, it changes the state to DELETED without resolving 

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