cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Drabenia (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAY-1695) Unexpected null value in bidirectional one-to-one prefetch
Date Fri, 14 Dec 2012 12:22:12 GMT

     [ https://issues.apache.org/jira/browse/CAY-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ilya Drabenia updated CAY-1695:
-------------------------------

    Attachment: 0001-CAY-1695-Unexpected-null-value-in-bidirectional-one-.patch

Problem was in cache. That update entity from snapshot during prefetch graph building.
Created new isolated graph manager and only after finished of prefetched graph building -
objects pushed to main context.
                
> 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: 0001-CAY-1695-Unexpected-null-value-in-bidirectional-one-.patch,
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

Mime
View raw message