tracker issue : CF-3668074

select a category, or use search below
(searches all categories and all time range)

Create a new ORM event handler for when ORM entities are created: postNew()

| View in Tracker

Status/Resolution/Reason: Closed/Deferred/LowImpact

Reporter/Name(from Bugbase): Luis Majano / Luis Majano (Luis Majano)

Created: 11/14/2013

Components: ORM Support

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final /

Priority/Frequency: Trivial / Unknown

Locale/System: English / Platforms All

Vote Count: 0

Create a new ORM event handler for when ORM entities are created: postNew(). The only missing event trigger is when an entity is created via entityNew(). This is critical for allowing full event-cycle for ORM events.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3668074

External Customer Info:
External Company:  
External Customer Name: LuisMajano
External Customer Email:  
External Test Config: My Hardware and Environment details:



Any particular use case? Wouldn't PreInsert do the job for this?
Comment by Himavanth R.
13982 | May 06, 2014 07:40:50 AM GMT
Sorry, just saw this. Would be nice if the bug system sent me an email that I needed to respond to :) Actually no, because I might never insert the entity. postNew() can give us capabilities to listen and do things like dependency injection or AOP on the entity. I cannot listen to preInsert() because I might need to call methods on the entity before preInsert() that require the entity methods to be changed or DI added.
Comment by External U.
13983 | June 02, 2014 09:13:44 AM GMT
Agreed. How about init()? I know it would be called before the data is populated when you use entitynew("entity",{values}); So it might not be useful if you need to do something with the populated data. The requirement for an event between init and preinsert is too specific a use case. No? Can we have some votes?
Comment by Himavanth R.
13984 | August 19, 2015 12:14:27 AM GMT
Hi Luis, Please provide us an update on this issue.
Comment by Nimit S.
13985 | September 13, 2015 12:26:26 PM GMT
Hi Luis, We are still waiting for your response.
Comment by Nimit S.
13986 | September 21, 2015 11:34:54 PM GMT
In case, users can come op with more use cases for this enhancement. We can re-evaluate this.
Comment by Nimit S.
13987 | September 22, 2015 03:19:45 AM GMT
THe problem is that users never get notified of issues. So I never knew you needed my input. This bug tracker is not very user friendly. Like I said, have a preNew() allows for dependency injection/aop to be instrumented on ORM entities before they are loaded. There is no current way, except to do manual calls.
Comment by Luis M.
13988 | December 20, 2016 02:06:45 PM GMT
hello update on this?
Comment by Luis M.
13989 | April 13, 2017 04:39:36 PM GMT