1. detecting dirty properties in PreUpdateEventListener forum.hibernate.orgI have implemented a PreUpdateEventListener to deny updates to a particular property under certain conditions. I am unsatisfied with my current approach. I would be very grateful if somebody would suggest a more elegant approach for detecting exactly which properties are dirty in a PreUpdateEventListener (or an entirely different strategy for doing this kind of thing). Code: public class PreUpdateEventListener extends ... |
2. Dirty, but no dirty properties forum.hibernate.orgRegular Joined: Wed Jul 07, 2004 2:00 pm Posts: 64 I have a group of objects, each of which has a property 'createdSignature' mapped as a component. This class contains a user ID (String) and a date/time (Calendar). I have an interceptor that traps onSave and onFlushDirty to set these values. Sometimes, but not always, I get an error 'dirty, but ... |
3. Check if a property is dirty? forum.hibernate.orgI know this isn't an advertised feature of Hibernate, but I'd like to be able to check if a property has been changed. Other than doing it myself (by keeping the original value, or adding logic to the setter), is there any way to ask Hibernate if an entity's property has been changed? It seems like it should have the information, ... |
4. Dirty checking of a property forum.hibernate.orgI'm using hibernate 3+ along with spring. I've implemented OpenSessionInViewFilter, so that the session is closed at the time of completion of request. I need to perform some business logic if a property value changes for an entity. When I do session.get, I do not get the snapshot of the entity from the database but the one which is currently available ... |