Yeah, I wanted to do that but failed. If you can help me fix it I would be glad. Basically the problem is referencing a table that has a composite key with renamed columns. If I specify the column names in the join it wouldn’t compile and if I specify the property names it generates broken SQL. I’ve resorted to this.

From: Gustavo Lopes [mailto:notifications@github.com]
Sent: vrijdag 7 maart 2014 11:36
To: thehyve/transmart-core-db
Cc: Jan Hudecek
Subject: Re: [transmart-core-db] Vcf implementation (#20)


In grails-app/domain/org/transmartproject/db/dataquery/highdim/vcf/DeVariantSubjectDetailCoreDb.groovy:

> +        quality column: 'qual'

> +        filter column: 'filter'

> +        info column: 'info'

> +        format column: 'format'

> +        variant column: 'variant_value', sqlType: 'clob'

> +    }

> +

> +    @Override

> +    String getChromosome() {

> +        return chr

> +    }

> +

> +    @Override

> +    Long getPosition() {

> +        return pos

> +    }

Instead of having these extra methods (which BTW you forgot to make transient), name the properties correctly in the first place and then adjust the database mapping.

—
Reply to this email directly or view it on GitHub<https://github.com/thehyve/transmart-core-db/pull/20/files#r10378955>.