[ 
https://issues.apache.org/jira/browse/CAY-1979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14250010#comment-14250010
 ] 

ASF GitHub Bot commented on CAY-1979:
-------------------------------------

GitHub user thinline72 opened a pull request:

    https://github.com/apache/cayenne/pull/52

    CAY-1979 | fix prefetches on Many-to-Many Relationships with Longvarchar

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/thinline72/cayenne CAY-1979

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/52.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #52
    
----
commit 49f4083ea14abdea268e983dc151436775962945
Author: Savva Kolbachev <s.kolbac...@gmail.com>
Date:   2014-12-17T15:38:59Z

    CAY-1979 | fix prefetches on Many-to-Many Relationships with Longvarchar

----


> Prefetches on Many-to-Many Relationships with Longvarchar
> ---------------------------------------------------------
>
>                 Key: CAY-1979
>                 URL: https://issues.apache.org/jira/browse/CAY-1979
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1
>            Reporter: Trevor Higgins
>            Assignee: Andrus Adamchik
>            Priority: Critical
>
> Discovered when performing a prefetch on a many-to-many relationship 
> involving a jump table, but may affect a varietey of prefetches.
> (Note: this is a 'disjoint' prefetch, as selected by Cayenne not by the 
> calling code)
> When performing a prefetch SelectAction.performAction checks 
> 'translator.isSuppressingDistinct()' and if so wraps the resultset iterator 
> in a DistinctResultIterator.
> The problem arises because when the unsupported distinct type is detected in 
> the target table SelectTranslator sets 'suppressingDistinct' to true and 
> DistinctResultIterator does NOT use full row comparisons (alternatively it 
> could also use the PKs from both sides of the arc but that currently isn't 
> implemented).
> This causes only the first row that a foreign pk appears in to be used and 
> the rest discarded, resulting in some to most of the relationships not being 
> represented in the object model.
> Expected behavior is for all arcs to show up in the object model regardless 
> of the column types.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to