Skip to content

Commit

Permalink
Update table.hbs for join definition. (#1713)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi-aga authored Dec 9, 2020
1 parent 647b125 commit 78bbea9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion elide-model-config/src/main/resources/templates/table.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class <%#capitalizeFirstLetter name%><%/capitalizeFirstLetter%>{
<%else%>
private <%joinClassName%> <%name%>;

@Join(value="<%#trimColumnReferences definition%><%/trimColumnReferences%>"<%#if type%>, type=JoinType.<%#toUpperCase type%><%/toUpperCase%><%/if%>)
@Join(value="<%#if definition%><%#trimColumnReferences definition%><%/trimColumnReferences%><%/if%>"<%#if type%>, type=JoinType.<%#toUpperCase type%><%/toUpperCase%><%/if%>)
public <%joinClassName%> get<%#capitalizeFirstLetter name%> <%/capitalizeFirstLetter%>() {
return <%name%>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ public class HandlebarsHydratorTest {
+ " {\n"
+ " name: playerCountry\n"
+ " to: Country\n"
+ " type: fuLL\n"
+ " definition: '{{ playerCountry.id}} = {{country_id}}'\n"
+ " type: Cross\n"
+ " },\n"
+ " {\n"
+ " name: playerTeam\n"
+ " to: Team\n"
+ " kind: Tomany\n"
+ " type: left\n"
+ " definition: '{{playerTeam.id}} = {{ team_id}}'\n"
+ " }\n"
+ " ]\n"
Expand Down Expand Up @@ -306,7 +306,7 @@ public class HandlebarsHydratorTest {
+ "\n"
+ " private Country playerCountry;\n"
+ "\n"
+ " @Join(value=\"{{playerCountry.id}} = {{country_id}}\", type=JoinType.FULL)\n"
+ " @Join(value=\"\", type=JoinType.CROSS)\n"
+ " public Country getPlayerCountry() {\n"
+ " return playerCountry;\n"
+ " }\n"
Expand All @@ -320,7 +320,7 @@ public class HandlebarsHydratorTest {
+ "\n"
+ " private Set<Team> playerTeam;\n"
+ "\n"
+ " @Join(value=\"{{playerTeam.id}} = {{team_id}}\")\n"
+ " @Join(value=\"{{playerTeam.id}} = {{team_id}}\", type=JoinType.LEFT)\n"
+ " public Set<Team> getPlayerTeam() {\n"
+ " return playerTeam;\n"
+ " }\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
{
name: playerCountry
to: Country
type: fuLL
definition: '{{ playerCountry.id}} = {{country_id}}'
type: Cross
},
{
name: playerTeam
to: Team
kind: Tomany
type: left
definition: '{{playerTeam.id}} = {{ team_id}}'
}
]
Expand Down

0 comments on commit 78bbea9

Please sign in to comment.