You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org> on 2007/07/29 23:09:59 UTC
[JIRA] Created: (CAY-834) DataContext and DataDomain must support
lifecycle callbacks out of the box without wrapping
DataContext and DataDomain must support lifecycle callbacks out of the box without wrapping
-------------------------------------------------------------------------------------------
Key: CAY-834
URL: https://issues.apache.org/cayenne/browse/CAY-834
Project: Cayenne
Issue Type: Improvement
Components: Cayenne Core Library
Affects Versions: 3.0
Reporter: Andrus Adamchik
Assignee: Andrus Adamchik
Fix For: 3.0
Wrapping cayenne stack objects in interceptors to do lifecycle callbacks is counterintuitive, requires extra code, and actually causes changes in behavior (CAY-830). We will need to incorporate callback logic in the main stack classes - DataContext, DataDomain.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [JIRA] Created: (CAY-834) DataContext and DataDomain must support lifecycle callbacks out of the box without wrapping
Posted by Andrus Adamchik <an...@objectstyle.org>.
I just fixed this issue. Meaning lifecycle callbacks are now first-
class citizens in Cayenne runtime and are always on.
One case I am not entirely sure how to handle is nested DataContexts.
Currently commit callbacks are not called on every DataContext in the
chain, rather they are only invoked at the end of the chain at the
DataDomain. Which may be ok... but PRE_PERSIST and PRE_REMOVE are
still called on every context in the chain... Feels like an
inconsistency. Need to figure out a good way to handle that.
Andrus
On Jul 30, 2007, at 12:09 AM, Andrus Adamchik (JIRA) wrote:
> DataContext and DataDomain must support lifecycle callbacks out of
> the box without wrapping
> ----------------------------------------------------------------------
> ---------------------
>
> Key: CAY-834
> URL: https://issues.apache.org/cayenne/browse/CAY-834
> Project: Cayenne
> Issue Type: Improvement
> Components: Cayenne Core Library
> Affects Versions: 3.0
> Reporter: Andrus Adamchik
> Assignee: Andrus Adamchik
> Fix For: 3.0
>
>
> Wrapping cayenne stack objects in interceptors to do lifecycle
> callbacks is counterintuitive, requires extra code, and actually
> causes changes in behavior (CAY-830). We will need to incorporate
> callback logic in the main stack classes - DataContext, DataDomain.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>