You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrei Veprev (Created) (JIRA)" <ji...@apache.org> on 2012/04/10 17:47:18 UTC

[jira] [Created] (CAY-1695) Unexpected null value in bidirectional one-to-one prefetch

Unexpected null value in bidirectional one-to-one prefetch
----------------------------------------------------------

                 Key: CAY-1695
                 URL: https://issues.apache.org/jira/browse/CAY-1695
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 3.1M3
            Reporter: Andrei Veprev


For example you have User and UserInfo entities. User has one-to-one relationship with UserInfo. If you try to do select for User with prefetching on userInfo and userInfo.user, you will get null value for userInfo property:

SelectQuery query = new SelectQuery(User.class);
query.addPrefetch("userInfo");
query.addPrefetch("userInfo.user");

It doest meter which kind of prefetching do you use. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAY-1695) Unexpected null value in bidirectional one-to-one prefetch

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

Andrus Adamchik updated CAY-1695:
---------------------------------

    Fix Version/s: 3.1B2
    
> Unexpected null value in bidirectional one-to-one prefetch
> ----------------------------------------------------------
>
>                 Key: CAY-1695
>                 URL: https://issues.apache.org/jira/browse/CAY-1695
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1M3
>            Reporter: Andrei Veprev
>             Fix For: 3.1B2
>
>         Attachments: CAY-1695-test.patch
>
>
> For example you have User and UserInfo entities. User has one-to-one relationship with UserInfo. If you try to do select for User with prefetching on userInfo and userInfo.user, you will get null value for userInfo property:
> SelectQuery query = new SelectQuery(User.class);
> query.addPrefetch("userInfo");
> query.addPrefetch("userInfo.user");
> It doest meter which kind of prefetching do you use. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAY-1695) Unexpected null value in bidirectional one-to-one prefetch

Posted by "Andrei Veprev (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAY-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrei Veprev updated CAY-1695:
-------------------------------

    Attachment: CAY-1695-test.patch

Patch with test
                
> Unexpected null value in bidirectional one-to-one prefetch
> ----------------------------------------------------------
>
>                 Key: CAY-1695
>                 URL: https://issues.apache.org/jira/browse/CAY-1695
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1M3
>            Reporter: Andrei Veprev
>         Attachments: CAY-1695-test.patch
>
>
> For example you have User and UserInfo entities. User has one-to-one relationship with UserInfo. If you try to do select for User with prefetching on userInfo and userInfo.user, you will get null value for userInfo property:
> SelectQuery query = new SelectQuery(User.class);
> query.addPrefetch("userInfo");
> query.addPrefetch("userInfo.user");
> It doest meter which kind of prefetching do you use. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira