You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fernando (JIRA)" <ji...@apache.org> on 2008/11/26 19:18:44 UTC

[jira] Created: (OPENJPA-790) queryImpl.setUnique can't be used with read-only mode

queryImpl.setUnique can't be used with read-only mode
-----------------------------------------------------

                 Key: OPENJPA-790
                 URL: https://issues.apache.org/jira/browse/OPENJPA-790
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 2.0.0
            Reporter: Fernando
            Priority: Minor


for some reason, the setUnique method is making sure that it's not ReadOnly..
But I would assume that setUnique is only called for select queries.. so it should only be for read-only queries.. they have nothing to do with update/delete right??


kernel/QueryImpl.java

    public void setUnique(boolean unique) {
        lock();
        try {
            assertOpen();
            assertNotReadOnly();
            _unique = (unique) ? Boolean.TRUE : Boolean.FALSE;
        } finally {
            unlock();
        }
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-790) queryImpl.setUnique can't be used with read-only mode

Posted by "Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651089#action_12651089 ] 

Fernando commented on OPENJPA-790:
----------------------------------

ooops

After reading more code and seeing the assertNotReadOnly in other weird places, i am guessing that it actually refers to the Query object itself being read-only, not the database.  I'm reading more to make sure.

> queryImpl.setUnique can't be used with read-only mode
> -----------------------------------------------------
>
>                 Key: OPENJPA-790
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-790
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            Priority: Minor
>
> for some reason, the setUnique method is making sure that it's not ReadOnly..
> But I would assume that setUnique is only called for select queries.. so it should only be for read-only queries.. they have nothing to do with update/delete right??
> kernel/QueryImpl.java
>     public void setUnique(boolean unique) {
>         lock();
>         try {
>             assertOpen();
>             assertNotReadOnly();
>             _unique = (unique) ? Boolean.TRUE : Boolean.FALSE;
>         } finally {
>             unlock();
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-790) queryImpl.setUnique can't be used with read-only mode

Posted by "Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651892#action_12651892 ] 

Fernando commented on OPENJPA-790:
----------------------------------

yeah, this is an invalid bug.. just close it. sorry.

> queryImpl.setUnique can't be used with read-only mode
> -----------------------------------------------------
>
>                 Key: OPENJPA-790
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-790
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            Priority: Minor
>
> for some reason, the setUnique method is making sure that it's not ReadOnly..
> But I would assume that setUnique is only called for select queries.. so it should only be for read-only queries.. they have nothing to do with update/delete right??
> kernel/QueryImpl.java
>     public void setUnique(boolean unique) {
>         lock();
>         try {
>             assertOpen();
>             assertNotReadOnly();
>             _unique = (unique) ? Boolean.TRUE : Boolean.FALSE;
>         } finally {
>             unlock();
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-790) queryImpl.setUnique can't be used with read-only mode

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee resolved OPENJPA-790.
--------------------------------

    Resolution: Invalid

Close issue per originator's request.


> queryImpl.setUnique can't be used with read-only mode
> -----------------------------------------------------
>
>                 Key: OPENJPA-790
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-790
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            Priority: Minor
>
> for some reason, the setUnique method is making sure that it's not ReadOnly..
> But I would assume that setUnique is only called for select queries.. so it should only be for read-only queries.. they have nothing to do with update/delete right??
> kernel/QueryImpl.java
>     public void setUnique(boolean unique) {
>         lock();
>         try {
>             assertOpen();
>             assertNotReadOnly();
>             _unique = (unique) ? Boolean.TRUE : Boolean.FALSE;
>         } finally {
>             unlock();
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-790) queryImpl.setUnique can't be used with read-only mode

Posted by "Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651085#action_12651085 ] 

Fernando commented on OPENJPA-790:
----------------------------------

also, whilre you're at it.. you can clean up the " _unique = (unique) ? Boolean.TRUE : Boolean.FALSE; ".

Now that there is autoboxing:

_unique = unique;


> queryImpl.setUnique can't be used with read-only mode
> -----------------------------------------------------
>
>                 Key: OPENJPA-790
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-790
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            Priority: Minor
>
> for some reason, the setUnique method is making sure that it's not ReadOnly..
> But I would assume that setUnique is only called for select queries.. so it should only be for read-only queries.. they have nothing to do with update/delete right??
> kernel/QueryImpl.java
>     public void setUnique(boolean unique) {
>         lock();
>         try {
>             assertOpen();
>             assertNotReadOnly();
>             _unique = (unique) ? Boolean.TRUE : Boolean.FALSE;
>         } finally {
>             unlock();
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OPENJPA-790) queryImpl.setUnique can't be used with read-only mode

Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Albert Lee closed OPENJPA-790.
------------------------------


> queryImpl.setUnique can't be used with read-only mode
> -----------------------------------------------------
>
>                 Key: OPENJPA-790
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-790
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 2.0.0
>            Reporter: Fernando
>            Priority: Minor
>
> for some reason, the setUnique method is making sure that it's not ReadOnly..
> But I would assume that setUnique is only called for select queries.. so it should only be for read-only queries.. they have nothing to do with update/delete right??
> kernel/QueryImpl.java
>     public void setUnique(boolean unique) {
>         lock();
>         try {
>             assertOpen();
>             assertNotReadOnly();
>             _unique = (unique) ? Boolean.TRUE : Boolean.FALSE;
>         } finally {
>             unlock();
>         }
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.