On 2/9/07, Jarek Gilewski <[EMAIL PROTECTED]> wrote:


Hello,

I have added Projects property to user object (projects the user is
involved
in).
For this property I have setProjects and getProjects.

The tables looks like:

app_user --> user_project --> project

I get the user information from ACEGI security context and want to get the
projects from the current users (by currentUser.getProjects).

The problem is that when I remove/update/insert some user projects in
user_project (I use the seperate form and controller for this) i have out
of
synch data in currentUser. How can i synchronize the projects set in
curentUser object with user_project table? Do I have to refresh the user
cach after the user_project update? Can I do this by some kind of
hibernate
annotations?


You could probably use Hibernate's API to clear the user cache, but it's
probably easier to do with AOP.  There's code that shows how to expire from
the cache in UserSecurityAdvice.  Just create a UserCacheAdvice (or
something like that) and use <aop:after> to invoke it after the save call.

Matt

Best Regards

Jarek

--
View this message in context:
http://www.nabble.com/Update-child-properties-of-User-object-tf3200824s2369.html#a8887119
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

Reply via email to