-none- 2007-10-01 - By Piero Sartini
Back > Since my Model is acquired from the Hibernate session (during the > "prepare()" Action method), it is a transactional persistent instance. > Note this from the hibernate documentation: > > "Transactional persistent instances (ie. objects loaded, saved, created or > queried by the Session) may be manipulated by the application and any > changes to persistent state will be persisted when the Session is flushed > (discussed later in this chapter). There is no need to call a particular > method (like update(), which has a different purpose) to make your > modifications persistent."
I do not know hibernate but you could try the following solutions:
* don't flush the session and destroy the object
* instantiate a temporary bean used for the form only: BeanUtils.copyProperties(tempBean, yourBean);
* manage your entities with JPA's EntityManager, merge them manually.
Piero
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|