CRUD create action should publish entity id after save
Bug #606777 reported by
AMcBain
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
play framework |
New
|
Undecided
|
Unassigned |
Bug Description
The CRUD controller should publish the id of the newly saved entities to the "params" variable. This is a small difference that goes a long way toward helping out @after annotations on CRUD controller subclasses handle both created and existing entities the same. As it is now, there is no way to get a saved entity if it is newly created.
Use-cases for this wrt @after allow for a nice "post save" hook that is valid for FileAttachments. Using JPA's @Post[\w]+ annotations or overriding the save method on models and calling super give the /tmp path for FileAttachments and this isn't usable since they will be shortly moved to the "attachments" directory.
Related branches
To post a comment you must log in.