You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Jurgen Doll (JIRA)" <ji...@apache.org> on 2017/03/03 15:52:45 UTC

[jira] [Updated] (CAY-2254) Move PrePersist & PreUpdate lifecycle events to occur before validation

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

Jurgen Doll updated CAY-2254:
-----------------------------
    Affects Version/s: 3.1.2

> Move PrePersist & PreUpdate lifecycle events to occur before validation
> -----------------------------------------------------------------------
>
>                 Key: CAY-2254
>                 URL: https://issues.apache.org/jira/browse/CAY-2254
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library, Documentation
>    Affects Versions: 3.1, 3.1.1, 4.0.M3, 4.0.M4, 3.1.2, 4.0.M5
>            Reporter: Jurgen Doll
>            Priority: Minor
>
> With regards to the PrePersist & PreUpdate lifecycle events it appears that developers are expecting these events to take place before validation occurs, as the original docs for 3.1 also indicate.
> Developers are trying to use these as a place to set default values before the actual commit occurs, but validation prevents this from happening. It was also noted that to make changes to the data after validation is not good practice.
> Options:
> 1. Move the lifecycle events to occur before validation (and update the docs for 4)
> 2. or Update the docs to clarify the function of PrePersist & PreUpdate, i.e. what it is for, what it is not for, and provide suggestions as to where / how to accomplish the not for things that developers are currently trying to do.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)