We ran into a situation that we belived we could solve through the Lifecycle
methods, but we found something lacking.. currently there is

onSave
onUpdate
onDelete
onLoad

all of these are called BEFORE the appropriate action is performed. What we
would like is a complementary set of AFTER calls

onSaved
onUpdated
onDeleted
onLoaded

our current main use is a field that is write-once. We would like to
dissallow "re-setting" of the field once it is set, but by dissallowing
resetting the property, hibernate cannot re-instantiate the object either!
so we would like to do something like
onLoad(){
  allowAccess = true;
}
setValue(){
  if(!allowAccess){
    throw new YouCantDoThatException();
  }
  ...
}
onLoaded(){
  allowAccess = false;
}

I would be willing to create a patch to add these methods, but I didnt want
to go through the exercise if the Hibernate team would reject the concept.

Thanks
Russell


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to