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/04/12 14:38:15 UTC

[jira] [Closed] (CAY-1802) Records present in multiple prefetch paths are not merged correctly into final result

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

Andrus Adamchik closed CAY-1802.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.2.M2

closing per Oleg's comment

> Records present in multiple prefetch paths are not merged correctly into final result
> -------------------------------------------------------------------------------------
>
>                 Key: CAY-1802
>                 URL: https://issues.apache.org/jira/browse/CAY-1802
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.1B2
>            Reporter: Dzmitry Kazimirchyk
>             Fix For: 3.2.M2
>
>         Attachments: CAY-1802-test.patch
>
>
> If same records getting prefetched through multiple prefetch paths, the final result will content corrupted records with relationships set to null. Example:
> Paintings are present in one prefetch path:
>         SelectQuery q = new SelectQuery(Artist.class);
>         q.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY);
>         q.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY + "." + Painting.TO_PAINTING_INFO_PROPERTY);
> artist.getPaintingArray().get(0).getPaintingInfo() will contain correct non null PaintingInfo record.
> But if paintings are present in multiple prefetch paths:
>         SelectQuery q = new SelectQuery(Artist.class);
>         q.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY);
>         q.addPrefetch(Artist.PAINTING_ARRAY_PROPERTY + "." + Painting.TO_PAINTING_INFO_PROPERTY);
>         q.addPrefetch(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY);
>         q.addPrefetch(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY + "." + ArtistExhibit.TO_EXHIBIT_PROPERTY);
>         q.addPrefetch(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY + "." + ArtistExhibit.TO_EXHIBIT_PROPERTY + "." + Exhibit.TO_GALLERY_PROPERTY);
>         q.addPrefetch(Artist.ARTIST_EXHIBIT_ARRAY_PROPERTY + "." + ArtistExhibit.TO_EXHIBIT_PROPERTY + "." + Exhibit.TO_GALLERY_PROPERTY + "." + Gallery.PAINTING_ARRAY_PROPERTY);
> artist.getPaintingArray().get(0).getPaintingInfo() will return null even if there is PaintingInfo associated with painting.



--
This message was sent by Atlassian JIRA
(v6.2#6252)