GrailsInAction / graina2

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

Correction to: Listing 3.3 Saving and retrieving a domain object from the database #14

Open philfriesen opened 11 years ago

philfriesen commented 11 years ago

For the test to pass, the following line needs to be changed

from: User.get(joe.id).userId == joe.userId
  to: User.get(joe.id).loginId == joe.loginId

It appears an ivar was renamed.

There are several more listings in this chapter with the same problem. Some tests use User.userId and others use User.loginId.

pledbrook commented 11 years ago

Thanks for the report. This is known and the manuscript has already been fixed, but it hasn't been pushed to the Manning repository. Keeping it open until that push has happened (at which point you'll see the fix in the next MEAP after the issue is closed).