Editing (some) users sometimes results in the user being inserted again..
-------------------------------------------------------------------------
Key: APF-1154
URL:
http://issues.appfuse.org/browse/APF-1154 Project: AppFuse
Issue Type: Bug
Components: Web - JSF
Affects Versions: 2.0.2
Environment: Hibernate, MySQL 5.0
Reporter: Bram Van Dam
Assignee: Matt Raible
1) Create a new user.
2) Edit the new user and save.
3) Lo and behold, AppFuse tells me the user already exists...which is kind of the idea when trying to edit.
The problem lies in UserForm.java:
<blockquote>
// For some reason, Canoo WebTest causes version to be 0. Set it to null so test will pass.
if (user.getVersion() != null && user.getVersion() == 0) {
user.setId(null);
user.setVersion(null);
}
</blockquote>
When a user is first created in my setup, user.version is set to 0 (ZERO). When it's edited, it's reset to null along with the ID. This behaviour is incorrect.
Fix: get rid of that chunk of code. If it breaks some webtest, then fix the test instead.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.appfuse.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail:
[hidden email]
For additional commands, e-mail:
[hidden email]