You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by "Robert Wruck (JIRA)" <de...@cayenne.apache.org> on 2008/10/05 22:52:11 UTC

[jira] Created: (CAY-1115) Prefetch on SelectQueries doesn't resolve ToOneFaults

Prefetch on SelectQueries doesn't resolve ToOneFaults
-----------------------------------------------------

                 Key: CAY-1115
                 URL: https://issues.apache.org/cayenne/browse/CAY-1115
             Project: Cayenne
          Issue Type: Bug
          Components: Cayenne Core Library
    Affects Versions: 1.2 [STABLE]
         Environment: 1.2.4 on Linux
            Reporter: Robert Wruck
            Assignee: Andrus Adamchik


final SelectQuery q = new SelectQuery(MyObject.class);
q.addPrefetch("myRelObject");
final List l = dataContext.performQuery(q);

For each element in the returned List, myRelObject is a ToOneFault that will be resolved by a separate query.
This result is not affected by setSemantics on the prefetch (JOINT, DISJOINT behave just the same way).
Expected result: myRelObject is filled with the prefetched entity object.


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


[jira] Commented: (CAY-1115) Prefetch on SelectQueries doesn't resolve ToOneFaults

Posted by "Andrus Adamchik (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138#action_13138 ] 

Andrus Adamchik commented on CAY-1115:
--------------------------------------

Hi Robert,

in general to-one prefetch works just fine, so there may be something specific to your mapping of this relationship. Could you post a sample mapping that has the affected tables/entities and relationships between them? (if you don't want to make it publicly visible, you can email it to me directly: andrus at objectstyle dot org)

> Prefetch on SelectQueries doesn't resolve ToOneFaults
> -----------------------------------------------------
>
>                 Key: CAY-1115
>                 URL: https://issues.apache.org/cayenne/browse/CAY-1115
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 1.2 [STABLE]
>         Environment: 1.2.4 on Linux
>            Reporter: Robert Wruck
>            Assignee: Andrus Adamchik
>
> final SelectQuery q = new SelectQuery(MyObject.class);
> q.addPrefetch("myRelObject");
> final List l = dataContext.performQuery(q);
> For each element in the returned List, myRelObject is a ToOneFault that will be resolved by a separate query.
> This result is not affected by setSemantics on the prefetch (JOINT, DISJOINT behave just the same way).
> Expected result: myRelObject is filled with the prefetched entity object.

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


[jira] Commented: (CAY-1115) Prefetch on SelectQueries doesn't resolve ToOneFaults

Posted by "Robert Wruck (JIRA)" <de...@cayenne.apache.org>.
    [ https://issues.apache.org/cayenne/browse/CAY-1115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13141#action_13141 ] 

Robert Wruck commented on CAY-1115:
-----------------------------------

Hi Andrus,

after some debugging, it turned out today that in some cases the number of fetched objects exceeded the DataRowStore size... DOH!
I was fooled by the fact that the relationships are initially populated with a ToOneFault that normally gets resolved from the local cache.
Please close this one.

> Prefetch on SelectQueries doesn't resolve ToOneFaults
> -----------------------------------------------------
>
>                 Key: CAY-1115
>                 URL: https://issues.apache.org/cayenne/browse/CAY-1115
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 1.2 [STABLE]
>         Environment: 1.2.4 on Linux
>            Reporter: Robert Wruck
>            Assignee: Andrus Adamchik
>
> final SelectQuery q = new SelectQuery(MyObject.class);
> q.addPrefetch("myRelObject");
> final List l = dataContext.performQuery(q);
> For each element in the returned List, myRelObject is a ToOneFault that will be resolved by a separate query.
> This result is not affected by setSemantics on the prefetch (JOINT, DISJOINT behave just the same way).
> Expected result: myRelObject is filled with the prefetched entity object.

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


[jira] Closed: (CAY-1115) Prefetch on SelectQueries doesn't resolve ToOneFaults

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

Andrus Adamchik closed CAY-1115.
--------------------------------

    Resolution: Won't Fix

> Prefetch on SelectQueries doesn't resolve ToOneFaults
> -----------------------------------------------------
>
>                 Key: CAY-1115
>                 URL: https://issues.apache.org/cayenne/browse/CAY-1115
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 1.2 [STABLE]
>         Environment: 1.2.4 on Linux
>            Reporter: Robert Wruck
>            Assignee: Andrus Adamchik
>
> final SelectQuery q = new SelectQuery(MyObject.class);
> q.addPrefetch("myRelObject");
> final List l = dataContext.performQuery(q);
> For each element in the returned List, myRelObject is a ToOneFault that will be resolved by a separate query.
> This result is not affected by setSemantics on the prefetch (JOINT, DISJOINT behave just the same way).
> Expected result: myRelObject is filled with the prefetched entity object.

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