GrailsInAction / graina2

Source code for the 2nd edition of Grails in Action
90 stars 92 forks source link

MEAP v13 ch11 Inconsistent labeling #83

Open danhyun opened 10 years ago

danhyun commented 10 years ago

Before Listing 11.1, the text discusses using a different name for the Security generated username.

In our case, we already have a User domain class and we don’t really want to overwrite that. So what we will do is rename  User to  TempUser so that it doesn’t get overwritten and run the same command: 
grails s2-quickstart com.grailsinaction DummyUser Role

Text indicates that we will use TempUser when the command shows a DummyUser

pledbrook commented 10 years ago

This was reported elsewhere I think, but it's not in GitHub issues so thanks for raising it. I'm a little unsure what I intended here. I think the command should be

grails s2-quickstart com.grailsinaction User Role

but I'll need to verify.

danhyun commented 10 years ago

I think you wanted to prevent the plugin from overwriting the existing User class and to copy over fields to the existing User class. Showing the generated class from our existing class and showing how to have the plugin conform to "our" standards is a great exercise. I also liked the comment about removing the GORM hooks for pre insert pre update events.