Skip to content

Commit

Permalink
Merge pull request Netflix#344 from DanielThomas/duplicate-ordinalget
Browse files Browse the repository at this point in the history
Assign the initial shortcut ordinal value from the already populated field
  • Loading branch information
Tim Taylor authored Nov 16, 2018
2 parents c5f2938 + 4bb7287 commit 3784f9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public String generate() {
if(shortcut != null) {
String ordinalVariableName = fieldName + "TempOrdinal";

builder.append(" int ").append(ordinalVariableName).append(" = typeAPI.get").append(uppercase(fieldName)).append("Ordinal(ordinal);\n");
builder.append(" int ").append(ordinalVariableName).append(" = ").append(fieldName).append("Ordinal;\n");

for(int j=0;j<shortcut.getPath().length-1;j++) {
String typeAPIName = HollowCodeGenerationUtils.typeAPIClassname(shortcut.getPathTypes()[j]);
Expand Down

0 comments on commit 3784f9e

Please sign in to comment.