You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Boris Daich (JIRA)" <ji...@apache.org> on 2019/04/03 09:55:00 UTC

[jira] [Reopened] (CAMEL-12963) camel-salesforce-maven-plugin generates code that does not compile

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

Boris Daich reopened CAMEL-12963:
---------------------------------

for 3.0.0-M2 the 
generated classes for 

Task 

SocialPost

SocialPersona

 

still does not compile with the same reason 
the "Polymorphism"

from the 

public class Task extends AbstractDescribedSObjectBase 
{code:java}
@JsonProperty("WhatId")
public void setWhatId(String WhatId) {
this.WhatId = WhatId;
}

private Account_Lookup WhatId_Lookup;

@JsonProperty("What")
public Account_Lookup getWhatId_Lookup() {
return this.WhatId_Lookup;
}

@JsonProperty("What")
public void setWhatId(Account_Lookup WhatId_Lookup) {
this.WhatId_Lookup = WhatId_Lookup;
}
private rtms__CarrierPayment__c_Lookup WhatId_Lookup;

@JsonProperty("What")
public rtms__CarrierPayment__c_Lookup getWhatId_Lookup() {
return this.WhatId_Lookup;
}

@JsonProperty("What")
public void setWhatId(rtms__CarrierPayment__c_Lookup WhatId_Lookup) {
this.WhatId_Lookup = WhatId_Lookup;
}
private rtms__CustomerPayment__c_Lookup WhatId_Lookup;

@JsonProperty("What")
public rtms__CustomerPayment__c_Lookup getWhatId_Lookup() {
return this.WhatId_Lookup;
}

@JsonProperty("What")
public void setWhatId(rtms__CustomerPayment__c_Lookup WhatId_Lookup) {
this.WhatId_Lookup = WhatId_Lookup;
}
private rtms__Load__c_Lookup WhatId_Lookup;

@JsonProperty("What")
public rtms__Load__c_Lookup getWhatId_Lookup() {
return this.WhatId_Lookup;
}

@JsonProperty("What")
public void setWhatId(rtms__Load__c_Lookup WhatId_Lookup) {
this.WhatId_Lookup = WhatId_Lookup;
}
{code}
 

 

> camel-salesforce-maven-plugin generates code that does not compile
> ------------------------------------------------------------------
>
>                 Key: CAMEL-12963
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12963
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-salesforce
>    Affects Versions: 2.22.2
>         Environment: windows 10 64bit Pro
> Java 10 same with Java 8 
>  
>            Reporter: Boris Daich
>            Assignee: Zoran Regvart
>            Priority: Major
>             Fix For: 3.0.0, 2.23.2, 2.24.0, 2.22.4
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> when running pom.xml with
> {code:java}
> <plugin>
>     <groupId>org.apache.camel.maven</groupId>
>     <artifactId>camel-salesforce-maven-plugin</artifactId>
>     <version>2.22.2</version>
>     <executions>
>         <execution>
>             <id>camel-sforce</id>
>             <phase>generate-sources</phase>
>             <goals>
>                 <goal>generate</goal>
>             </goals>
>         </execution>
>     </executions>
>     <configuration>
>         <outputDirectory>${project.basedir}/src/main/java</outputDirectory>
>         <version>44.0</version>
>         <clientId>${my.clientId}</clientId>
>         <clientSecret>${my.clientSecret}</clientSecret>
>         <userName>${my.username}</userName>
>         <password>${my.password}</password>
>         <loginUrl>${my.loginUrl}</loginUrl>
>         <packageName>com.my.entities4camel</packageName>
>         <includes>
>             <include>Task</include>
>         </includes>
>     </configuration>
> </plugin>
> {code}
> the generated code does not compile because of the code like
> {code:java}
> private Account_Lookup What;
>     @JsonProperty("What")
>     public Account_Lookup getWhat() {
>         return this.What;
>     }
>     @JsonProperty("What")
>     public void setWhat(Account_Lookup What) {
>         this.What = What;
>     }
>     private rtms__CarrierPayment__c_Lookup What;
>     @JsonProperty("What")
>     public rtms__CarrierPayment__c_Lookup getWhat() {
>         return this.What;
>     }
>     @JsonProperty("What")
>     public void setWhat(rtms__CarrierPayment__c_Lookup What) {
>         this.What = What;
>     }
> {code}
>  
> it seems that any field that has Salesforce "polymorphism" (able to reference any type of Entity) causes the issue.
> {{Task}} just simplest example.
> Another thing that might be important: I run on top of an installed package the fields with prefix {{rtms__}} are from the managed package.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)