findDirty « Interceptor « JPA Q&A





1. Implementing Interceptor.findDirty    forum.hibernate.org

I'm looking to save myself some grief. I need to implement Interceptor.findDirty - the behavior will be very much like Hibernate's findDirty with a small change. I really dread the idea of getting into the dirty-detection business (from reading the forum, it looks like there are plenty of pitfalls), and just thought I'd ask if someone was willing to share an ...

2. Semantics of Interceptor.findDirty(...)    forum.hibernate.org

hi ernst_pluess, i don't know exactly, but i've taken a look at SessionImpl.flushEntity() in line 2482 and it seems to me, that when you return an int[], hibernate won't do the default-handling ... hibernate expects you to do the dirty-handling ... I hope i don't overlooked a "interceptor.findDirty"-call ... Not nice .. but a workaround could be to do the default-handling ...

3. Interceptor::findDirty function    forum.hibernate.org

If the index of the property "image" is 0, it will still get updated since your ret_val will contain one unused slot preinitialized to 0 (the local variable j is useless for what you're trying to do). You'd need a variable sized ArrayList for this which you convert to int[] at the end. Also, if you don't want to muck around ...

4. Help needed using findDirty in Interceptor    forum.hibernate.org

Hibernate version: 3.2.6.ga Hello, I'm trying to use an Interceptor, and I haven't been able to find the answers to a couple of (seemingly) basic questions. I've got things configured OK, my Interceptor is being called when I expect. 1) In the documentation for Interceptor.findDirty(), the return value is described as: The return value determines whether the entity is updated * ...