You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (JIRA)" <ji...@apache.org> on 2014/01/10 07:46:50 UTC
[jira] [Commented] (CAY-1796) ROP: All entity's to-many
relationships getting faulted from database when using it as a parameter in
qualifier expression.
[ https://issues.apache.org/jira/browse/CAY-1796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867565#comment-13867565 ]
Andrus Adamchik commented on CAY-1796:
--------------------------------------
[~olegart] IMO the idea is correct. We need to write unit tests for it though. I think there may be some Expression structures where object argument is not wrapped in ASTScalar. So we need to test these cases:
* Expression created via ExpressionFactory methods
* Expression created via Expression.expWithParameters(..)
* Expressions where parameters are passed as collections (e.g. "IN" expression).
> ROP: All entity's to-many relationships getting faulted from database when using it as a parameter in qualifier expression.
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: CAY-1796
> URL: https://issues.apache.org/jira/browse/CAY-1796
> Project: Cayenne
> Issue Type: Bug
> Components: ROP
> Affects Versions: 3.1B2
> Reporter: Dzmitry Kazimirchyk
> Fix For: 3.1B3
>
> Attachments: cay1796.patch, cay1796_2.patch
>
>
> If entity is used as a parameter in qualifier expression all its unfaulted to-many relationships are faulted prior to actual query sent to server. For example:
> Expression exp = ExpressionFactory.matchExp(Painting.ARTIST_PROPERTY, artist);
> context.performQuery(new SelectQuery(Painting.class, exp));
> Before actual query will be sent to server all artist's to-many relationships will be faulted. What I see is that in the process of query serialization on client side PersistentObjectList.size() is invoked which triggers relationships' faulting from database.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)