-failure-still-causes-JPA-update-tp12987242p21062748.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h
]
10/02/2007 12:14 AM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
'Struts Users Mailing List' user@struts.apache.org
cc
Subject
RE: ModelDriven CRUD validation failure still causes JPA update -
RESOLVED
Just a thought, are you actually using
October 2007 04:04
To: Struts Users Mailing List
Subject: Re: ModelDriven CRUD validation failure still causes JPA update -
RESOLVED
OK: I've fixed the problem.
I'm not sure why this was the case, but here is what was causing the
problem:
In my ModelDriven action, I had a method like
@struts.apache.org
To
'Struts Users Mailing List' user@struts.apache.org
cc
Subject
RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED
Just a thought, are you actually using transactions?
If so why not modify the interceptor to only commit if a SUCCESS is
returned
Al Sutton [EMAIL PROTECTED]
10/02/2007 12:14 AM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
'Struts Users Mailing List' user@struts.apache.org
cc
Subject
RE: ModelDriven CRUD validation failure still causes JPA update - RESOLVED
Just a thought, are you
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 02 October 2007 04:04
To: Struts Users Mailing List
Subject: Re: ModelDriven CRUD validation failure still causes JPA update -
RESOLVED
OK: I've fixed the problem.
I'm not sure why this was the case, but here is what was causing
I have a ModelDriven action which controls CRUD operations on JPA managed
Entity E. E has a property called ?name? which maps to a database column
with a NOT NULL constraint. I have added a RequiredStringValidator
annotation to my Action to validate that the ?model.name? property is
non-null.
If there is a validation error the code on your action shouldn't be
executed at all, so you wouldn't have this problem. Are you applying
the defaultWorkflow interceptor to your action?
regards
musachy
On 10/1/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have a ModelDriven action which
@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
If there is a validation error the code on your action shouldn't be
executed at all, so you wouldn't have this problem. Are you applying
the defaultWorkflow
validation failure still causes
JPA update
If there is a validation error the code on your
action shouldn't be
executed at all, so you wouldn't have this problem.
Are you applying
the defaultWorkflow interceptor to your action?
regards
musachy
On 10/1/07, [EMAIL PROTECTED
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
* instantiate a temporary bean used for the form only:
BeanUtils.copyProperties(tempBean, yourBean);
That's what I do.
musachy
--
Hey you! Would you help me to carry the stone? Pink Floyd
-
To unsubscribe, e-mail: [EMAIL
Centre Ave, Building C
Fort Collins, CO 80526-8116
Dave Newton [EMAIL PROTECTED]
10/01/2007 03:32 PM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
--- [EMAIL PROTECTED] wrote:
That's an interesting idea Dave. I'm using the
paramsPrepareStack. It'll take some investigation to
see if that would fix the issue.
Shouldn't take much; it might be as simple as adding a
validate/defaultWorkFlow up towards the top (although
I might try just
I only use the beanutils.copy solution on a few places, on the other
cases I always load the object model on the prepare() method if the
id field is set (editing), and then call update or create on the
entity manager in my action method. I never got that problem so I'm
wondering what is different.
-8116
Piero Sartini [EMAIL PROTECTED]
10/01/2007 03:38 PM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
Since my Model is acquired from
Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
I only use the beanutils.copy solution on a few places, on the other
cases I always load the object model on the prepare() method
@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
I only use the beanutils.copy solution on a few places, on the other
cases I always load the object model on the prepare() method if the
id field is set
Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
--- [EMAIL PROTECTED] wrote:
That's an interesting idea Dave. I'm using the
paramsPrepareStack. It'll take some investigation to
see if that would fix the issue.
Shouldn't
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
Only difference is that I don't use model driven. Is there any setting
to tell hibernate to flush the session when closed or it does that by
default?
musachy
On 10
Collins, CO 80526-8116
[EMAIL PROTECTED]
10/01/2007 08:29 PM
Please respond to
Struts Users Mailing List user@struts.apache.org
To
Struts Users Mailing List user@struts.apache.org
cc
Subject
Re: ModelDriven CRUD validation failure still causes JPA update
Unfortunately, it appears
21 matches
Mail list logo