tracker issue : CF-3036949

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

Bug 73960:(Watson Migration Closure)[ORM] there should be a ORMIsDirty(Entity) which would return true if

| View in Tracker

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

Reporter/Name(from Bugbase): João Fernandes / João Fernandes (Joao Fernandes)

Created: 12/03/2008

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Platforms All

Vote Count: 0


[ORM] there should be a ORMIsDirty(Entity) which would return true if
1) not exist in the database
2) if exists but properties values don't match to the corresponding entity entityLoad( entity , pk ).

This is important if for example we are returning entities from Flex to CF. For LCDS this would be an easy way to implement conflict resolution since we always get the oldbean + newbean we could do something like this <cfif not ORMIsDirty( oldBean )><cfset EntitySave( newBean )></cfif> 



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

Watson Bug ID:	3036949

External Customer Info:
External Company:  
External Customer Name: João Fernandes
External Customer Email: 4E9A42C244586146992015D5
External Test Config: 12/03/2008



Hibernate automatically checks if the object is dirty and saves it only if needed. Even if user calls EntitySave() on an object without caring if it needs to be saved, hibernate will anyway check it and no extra call will go to the DB. For the use case that the user has mentioned, user can call ObjectEquals which will compare two objects which will say if there is any difference between the old object and new object. So, ORMIsDirty method is not required (Comment added from ex-user id:nawani)
Comment by Adobe D.
24518 | December 08, 2014 08:35:44 AM GMT