|
Re: PreUpdate not working [message #523937 is a reply to message #523923] |
Mon, 29 March 2010 21:55 |
Shumy Mising name Messages: 24 Registered: March 2010 Location: Aveiro, Portugal |
Junior Member |
|
|
I also detected something else.
I have raise the level of logging to "ALL", detected that forcing a persistence instead of relying on cascade does not work.
The logs:
AUDIT UPDATE
[EL Finest]: 2010-03-29 22:49:49.722--UnitOfWork(29408998)--Thread(Thread[http-8080- 3,5,main])--PERSIST operation called on: gvl.domain.impl.base.Audit@e920f.
[EL Finest]: 2010-03-29 22:49:49.722--UnitOfWork(29408998)--Thread(Thread[http-8080- 3,5,main])--assign sequence to the object (5 -> gvl.domain.impl.base.Audit@e920f)
[EL Fine]: 2010-03-29 22:49:49.725--ClientSession(305514)--Connection(9423995)--Th read(Thread[http-8080-3,5,main])--UPDATE gvl_user SET NAME = ? WHERE (ID = ?)
bind => [Micael Pedrosa, 1]
[EL Finer]: 2010-03-29 22:49:49.731--ClientSession(305514)--Connection(9423995)--Th read(Thread[http-8080-3,5,main])--commit transaction
[EL Finer]: 2010-03-29 22:49:49.733--UnitOfWork(29408998)--Thread(Thread[http-8080- 3,5,main])--end unit of work commit
[EL Finer]: 2010-03-29 22:49:49.733--UnitOfWork(29408998)--Thread(Thread[http-8080- 3,5,main])--resume unit of work
It's visable that the PERSIST operation is called on "Audit" but the SQL to INSERT is never generated.
This works fine on OpenJPA.
[Updated on: Mon, 29 March 2010 21:57] Report message to a moderator
|
|
|
Re: PreUpdate not working [message #524575 is a reply to message #523923] |
Thu, 01 April 2010 13:25 |
|
You should see more than this logged on ALL, you should also see the query execution logged and registration. Can you include the complete log for the whole process. Maybe set level to FINEST, although ALL should include everything.
Also include the code for the two classes and the code for the event listener and how you are persisting the objects.
Do you have any existing data in the cache or database that may be conflicting with the Aduti's id?
James : Wiki : Book : Blog : Twitter
|
|
|
Powered by
FUDForum. Page generated in 0.03331 seconds