You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Michael Dick (JIRA)" <ji...@apache.org> on 2008/05/05 22:41:55 UTC

[jira] Created: (OPENJPA-591) Entities are flushed before being detached or serialized

Entities are flushed before being detached or serialized
--------------------------------------------------------

                 Key: OPENJPA-591
                 URL: https://issues.apache.org/jira/browse/OPENJPA-591
             Project: OpenJPA
          Issue Type: Sub-task
          Components: kernel
    Affects Versions: 1.0.2, 1.0.1, 1.0.0
            Reporter: Michael Dick
            Assignee: Michael Dick
             Fix For: 1.0.3, 1.2.0


Entities are flushed if the entity is serialized or if the detach and detachAll methods are invoked.

Similar to OPENJPA-119 I believe this is a remnant of the JDO persistence layer. Whether this is desirable in JPA or not, we need to be consistent whether the entity is detached via clear, or the detach methods. 

To resolve the problem I propose adding a new Compatibility option : flushBeforeDetach. If this is set to true we'll keep the current JDO-like behavior. If false then we'll just detach. I believe the same setting could apply when entities are serialized although it might be clearer to have a separate option for serialization. 

In the 1.0.x branch the flushBeforeDetach setting will only take effect for the detach, detachAll and serialization path. It will not affect the EntityManager.clear() method - in order to maintain backwards compatibility. 

In 1.2.x + the clear method will also defer to the flushBeforeDetach setting. 

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


[jira] Updated: (OPENJPA-591) Entities are flushed before being detached or serialized

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

Patrick Linskey updated OPENJPA-591:
------------------------------------

    Fix Version/s: 1.1.0

> Entities are flushed before being detached or serialized
> --------------------------------------------------------
>
>                 Key: OPENJPA-591
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-591
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: kernel
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>             Fix For: 1.0.3, 1.1.0, 1.2.0
>
>
> Entities are flushed if the entity is serialized or if the detach and detachAll methods are invoked.
> Similar to OPENJPA-119 I believe this is a remnant of the JDO persistence layer. Whether this is desirable in JPA or not, we need to be consistent whether the entity is detached via clear, or the detach methods. 
> To resolve the problem I propose adding a new Compatibility option : flushBeforeDetach. If this is set to true we'll keep the current JDO-like behavior. If false then we'll just detach. I believe the same setting could apply when entities are serialized although it might be clearer to have a separate option for serialization. 
> In the 1.0.x branch the flushBeforeDetach setting will only take effect for the detach, detachAll and serialization path. It will not affect the EntityManager.clear() method - in order to maintain backwards compatibility. 
> In 1.2.x + the clear method will also defer to the flushBeforeDetach setting. 

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


[jira] Updated: (OPENJPA-591) Entities are flushed before being detached or serialized

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

Patrick Linskey updated OPENJPA-591:
------------------------------------

    Fix Version/s:     (was: 1.1.0)
                   1.1.1

> Entities are flushed before being detached or serialized
> --------------------------------------------------------
>
>                 Key: OPENJPA-591
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-591
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: kernel
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>             Fix For: 1.0.3, 1.1.1, 1.2.0
>
>
> Entities are flushed if the entity is serialized or if the detach and detachAll methods are invoked.
> Similar to OPENJPA-119 I believe this is a remnant of the JDO persistence layer. Whether this is desirable in JPA or not, we need to be consistent whether the entity is detached via clear, or the detach methods. 
> To resolve the problem I propose adding a new Compatibility option : flushBeforeDetach. If this is set to true we'll keep the current JDO-like behavior. If false then we'll just detach. I believe the same setting could apply when entities are serialized although it might be clearer to have a separate option for serialization. 
> In the 1.0.x branch the flushBeforeDetach setting will only take effect for the detach, detachAll and serialization path. It will not affect the EntityManager.clear() method - in order to maintain backwards compatibility. 
> In 1.2.x + the clear method will also defer to the flushBeforeDetach setting. 

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


[jira] Closed: (OPENJPA-591) Entities are flushed before being detached or serialized

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

Michael Dick closed OPENJPA-591.
--------------------------------

    Resolution: Fixed

Sorry Patrick, I didn't notice your update until now. The changes currently do not affect the EntityManager.clear() method contrary to my earlier remarks in the issue.

For now I'm going to close the issue, if we need to link em.clear with em.detach then we can open a sub task. 

> Entities are flushed before being detached or serialized
> --------------------------------------------------------
>
>                 Key: OPENJPA-591
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-591
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: kernel
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>             Fix For: 1.0.3, 1.1.1, 1.2.0
>
>
> Entities are flushed if the entity is serialized or if the detach and detachAll methods are invoked.
> Similar to OPENJPA-119 I believe this is a remnant of the JDO persistence layer. Whether this is desirable in JPA or not, we need to be consistent whether the entity is detached via clear, or the detach methods. 
> To resolve the problem I propose adding a new Compatibility option : flushBeforeDetach. If this is set to true we'll keep the current JDO-like behavior. If false then we'll just detach. I believe the same setting could apply when entities are serialized although it might be clearer to have a separate option for serialization. 
> In the 1.0.x branch the flushBeforeDetach setting will only take effect for the detach, detachAll and serialization path. It will not affect the EntityManager.clear() method - in order to maintain backwards compatibility. 
> In 1.2.x + the clear method will also defer to the flushBeforeDetach setting. 

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


[jira] Commented: (OPENJPA-591) Entities are flushed before being detached or serialized

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12596162#action_12596162 ] 

Patrick Linskey commented on OPENJPA-591:
-----------------------------------------

Why is this still listed as open?

> Entities are flushed before being detached or serialized
> --------------------------------------------------------
>
>                 Key: OPENJPA-591
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-591
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: kernel
>    Affects Versions: 1.0.0, 1.0.1, 1.0.2
>            Reporter: Michael Dick
>            Assignee: Michael Dick
>             Fix For: 1.0.3, 1.2.0
>
>
> Entities are flushed if the entity is serialized or if the detach and detachAll methods are invoked.
> Similar to OPENJPA-119 I believe this is a remnant of the JDO persistence layer. Whether this is desirable in JPA or not, we need to be consistent whether the entity is detached via clear, or the detach methods. 
> To resolve the problem I propose adding a new Compatibility option : flushBeforeDetach. If this is set to true we'll keep the current JDO-like behavior. If false then we'll just detach. I believe the same setting could apply when entities are serialized although it might be clearer to have a separate option for serialization. 
> In the 1.0.x branch the flushBeforeDetach setting will only take effect for the detach, detachAll and serialization path. It will not affect the EntityManager.clear() method - in order to maintain backwards compatibility. 
> In 1.2.x + the clear method will also defer to the flushBeforeDetach setting. 

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