« Return to Thread: ACEGI Mangling my user domain object state?

Re: ACEGI Mangling my user domain object state?

by Burt Beckwith :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
It's not Spring Security and it's not the plugin, it's your custom code.


Spring Security uses a helper class to load the user domain class, and the plugin's implementation basically calls User.findByUsername(username) - it's a little more convoluted (using HQL) since there are config options, but it's a read-only operation. It loads the user, then loads authorities, extracts some field data and compares passwords. Simple.


You most likely have a setter or a getter that's changing the value of a field. When Hibernate loads an instance it caches the original data and uses that for dirty detection - when flushing, if a value returned from a getter doesn't match the original value (either because the getter is customized or the setter was at instantiation) then it'll report a false dirty and push to the database.


Burt


On Thursday 02 July 2009 3:54:15 pm Robert Fischer wrote:
> I don't know how or why, but ACEGI is mangling the user domain object state, and it's making
> Hibernate think it's always dirty, although I can't see what property's changed. Any idea what
> might be causing this behavior, or where I should go look to find it?
>
> ~~ Robert Fischer


 « Return to Thread: ACEGI Mangling my user domain object state?