[JIRA] Created: (APF-1154) Editing (some) users sometimes results in the user being inserted again..

4 messages Options
Embed this post
Permalink
AppFuse - Issues mailing list

[JIRA] Created: (APF-1154) Editing (some) users sometimes results in the user being inserted again..

Reply Threaded More More options
Print post
Permalink
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]

AppFuse - Issues mailing list

[JIRA] Commented: (APF-1154) Editing (some) users sometimes results in the user being inserted again..

Reply Threaded More More options
Print post
Permalink

    [ http://issues.appfuse.org/browse/APF-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12680 ]

Bram Van Dam commented on APF-1154:
-----------------------------------

I should have probably specified that any changes I make to the user, are not saved as a result of this.

> 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]

AppFuse - Issues mailing list

[JIRA] Updated: (APF-1154) Editing (some) users sometimes results in the user being inserted again..

Reply Threaded More More options
Print post
Permalink
In reply to this post by AppFuse - Issues mailing list

     [ http://issues.appfuse.org/browse/APF-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Raible updated APF-1154:
-----------------------------

    Fix Version/s: 2.1

Can you please specify your exact version of MySQL? This might be a MySQL issue. Also, have you upgraded your version of MyFaces?

> 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
>             Fix For: 2.1
>
>
> 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]

AppFuse - Issues mailing list

[JIRA] Updated: (APF-1154) Editing (some) users sometimes results in the user being inserted again..

Reply Threaded More More options
Print post
Permalink
In reply to this post by AppFuse - Issues mailing list

     [ http://issues.appfuse.org/browse/APF-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Raible updated APF-1154:
-----------------------------

    Fix Version/s:     (was: 2.1.0-M1)
                   2.1.0-M2

> 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
>            Priority: Minor
>             Fix For: 2.1.0-M2
>
>
> 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]