Re: [intermine] List conversion - config ignored, all fields displayed (#777)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [intermine] List conversion - config ignored, all fields displayed (#777)

InterMine mailing list
Hi Joe

That looks correct to me!

I'll change my patch to match, yours is clearer.

Cheers
Julie

On 17/10/14 18:50, Joe Carlson wrote:

> Hi Julie,
>
> thanks for the quick fix. I was walking through the code a bit to see
> what the problem was myself before I saw your patch. I must be lagging a
> little behind your code since my version for getDefaultViewForClass has
> a different signature. I was thinking that if it’s needed to check that
> something is an attribute it needs to be done from the point of view of
> the converted-to type.
>
> ---
> a/intermine/web/main/src/org/intermine/web/logic/pathqueryresult/PathQueryResultHelper.java
> +++
> b/intermine/web/main/src/org/intermine/web/logic/pathqueryresult/PathQueryResultHelper.java
> @@ -94,7 +94,9 @@ public final class PathQueryResultHelper
>               if (fieldConfig.getShowInResults()) {
>                   try {
>                       Path path = new Path(model, prefix + "." + relPath);
> -                    if (path.isOnlyAttribute()) {
> +                    // JWC check attribute relative to converted to type
> +                    Path checkIsOnlyAttribute = new
> Path(model,type+"."+relPath);
> +                    if (checkIsOnlyAttribute.isOnlyAttribute()) {
>                           view.add(path.getNoConstraintsString());
>                       }
>                   } catch (PathException e) {
>
> Am I making some incorrect assumptions here?
>
>
> Thanks for the work,
>
> Joe
>
>
> On Oct 17, 2014, at 4:53 AM, Julie Sullivan <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>> 3c3fa6a
>> <https://github.com/intermine/intermine/commit/3c3fa6a5a11fdfee35346a5a7e4073c178ffd841>
>>
>> —
>> Reply to this email directly or view it on GitHub
>> <https://github.com/intermine/intermine/issues/777#issuecomment-59502142>.
>>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev