Skip to content

Commit

Permalink
FORGE-1339: idStrategy is no longer required and assumes default of AUTO
Browse files Browse the repository at this point in the history
if not informed
  • Loading branch information
gastaldi committed Nov 26, 2013
1 parent 43f9aa5 commit 5929e8f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class NewEntityCommand extends AbstractJavaEECommand
private UIInput<String> targetPackage;

@Inject
@WithAttributes(label = "ID Column Generation Strategy", required = true)
@WithAttributes(label = "ID Column Generation Strategy")
private UISelectOne<GenerationType> idStrategy;

@Inject
Expand Down Expand Up @@ -137,6 +137,10 @@ public Result execute(UIExecutionContext context) throws Exception
String entityName = named.getValue();
String entityPackage = targetPackage.getValue();
GenerationType idStrategyChosen = idStrategy.getValue();
if (idStrategyChosen == null)
{
idStrategyChosen = GenerationType.AUTO;
}
DirectoryResource targetDir = targetLocation.getValue();
Project project = getSelectedProject(context);
JavaResource javaResource;
Expand Down

0 comments on commit 5929e8f

Please sign in to comment.