[ 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: 4.0.M5 > 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)