Issue Details (XML | Word | Printable)

Key: GRAILS-245
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Graeme Rocher
Reporter: Marcel Overdijk
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

generate-all does not generate controller

Created: 05/Aug/06 04:46 AM   Updated: 05/Aug/06 05:30 AM   Resolved: 05/Aug/06 05:30 AM
Return to search
Component/s: Commons
Affects Version/s: 0.2.1
Fix Version/s: 0.2.2

Time Tracking:
Not Specified

Environment: Windows XP


 Description  « Hide

The generate-all command does not generate the controller. Only the view are generated.

The bug is in the grails.util.GenerateUtils class

if(VIEWS.equals(type) || ALL.equals(type)) { LOG.info("Generating views for domain class ["+domainClass.getName()+"]"); generator.generateViews(domainClass,"."); }
else if(CONTROLLER.equals(type)|| ALL.equals(type)) { LOG.info("Generating controller for domain class ["+domainClass.getName()+"]"); generator.generateController(domainClass,"."); }
else { LOG.info("Grails was unable to generate templates for unsupported type ["+type+"]"); }

The problem is caused by the else if statement. It should be an independent if. However the else at the end to log an unsupported type need to be changed as well.



Graeme Rocher made changes - 05/Aug/06 05:30 AM
Field Original Value New Value
Fix Version/s 0.2.2 [ 12820 ]
Graeme Rocher added a comment - 05/Aug/06 05:30 AM

Woops. Silly me.


Graeme Rocher made changes - 05/Aug/06 05:30 AM
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]