small medium large xlarge

Back to: All Forums  Grails
Foto_pragsmall
12 Jun 2009, 21:38
aitor alzola (2 posts)

hi there, the change explained in pages 110-117 is wrong?? I think I need something like this: messageInstance.event = TekEvent.get(params.eventId) in the create method of the MessageController, to link the event to the message. I can´t find it in the code in the pdf… ¿am I missing something?

Thanks you, good job.

Dklein_tiny_pragsmall
16 Jun 2009, 18:19
Dave Klein (34 posts)

On page 110 it shows the parameter being called “event.id” rather than “eventId” If it is named this way then Grails will take care of retrieving an instance by id and assigning it to the event property of the Message. You can also do it the way you are describing but unless you need to do something else with the event before assigning it there’s no benefit that I can think of.

I hope that clears it up. Please reply back if you are still have questions.

Thanks, Dave

You must be logged in to comment