tracker issue : CF-3038328

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

Bug 76833:(Watson Migration Closure)Requesting an EntityNew() function and onNew()handler

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): Bob Silverberg / Bob Silverberg (Bob Silverberg)

Created: 04/26/2009

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 0

Problem:

Requesting an EntityNew() function and onNew()handler.

I would like an EntityNew() function to be made available, which would allow for the creation of empty, persisted entities, similar to how EntityLoad() can be used to return an existing persisted entity.  In addition, when a new entity is created via EntityNew(), an onNew() handler should be invoked in the interceptor.

The current implementation forces developers to use CreateObject() to create new persistent entities, whereas one uses EntityNew() to create existing persisted entities.  This inconsistency creates design problems, where the same logic potentially has to exist in two different places, and could also be confusing to developers (inconsistent often equals confusing).

This ER is similar to ER #76803, except that it is also requesting the onNew() handler.  Some discussion of the reasons for this request can be found in this thread:
https://prerelease.adobe.com/project/forum/thread.html?cap=87529BDA13744B3DB718E841890B9240&forid={936680A8-3CD1-4D52-BCEE-9EF903D7FB02}&topid={EA6479E4-73EA-45EF-A1F6-3078AB3E8680}


Method:


Result:

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

Watson Bug ID:	3038328

External Customer Info:
External Company:  
External Customer Name: Bob Silverberg
External Customer Email: 5AD606C248A4C7F0992015A9
External Test Config: 04/26/2009

Attachments:

Comments:

EntityNew exists and preInsert can be used in place of onNew
Comment by Himavanth R.
23758 | July 01, 2014 03:06:45 AM GMT