|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Grails console issues
Hi, I am using grails 1.1.1 and working through Chapter 9 of The
definitive guide to Grails. There is mention of the grails console and how it
can be used to test GORM dynamic finder methods on your domain model. I started grails console and when I try to execute the
following code it fails: def album = Album.findByGenre("Rock") Output: groovy> def album = Album.findByGenre("Rock") Exception thrown: No such property: Album for class:
ConsoleScript0 groovy.lang.MissingPropertyException: No such property:
Album for class: ConsoleScript0 at ConsoleScript0.run(ConsoleScript0:1) Is there anything I might have missed? Thanks! Guillaume
Jeudy – JAVA DEVELOPER gjeudy@... This electronic mail (including any attachments) may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic email or its contents (including any attachments) by persons other than the intended recipient(s) is strictly prohibited. If you have received this message in error, please notify us immediately by reply email so that we may correct our internal records. Please then delete the original message (including any attachments) in its entirety. Thank you.
Ce courrier électronique (en incluant n'importe quels attachements) peut contenir des renseignements qui sont donnés le privilège, confidentiel, et-ou protégés autrement de la divulgation à quelqu'un autre que son destinataire (s) voulu. N'importe quelle diffusion ou utilisation de ce courrier électronique électronique ou de ses contenus (en incluant n'importe quels attachements) par les personnes autre que le destinataire (s) voulu sont sévèrement interdits. Si vous avez reçu ce message par erreur, notifiez-nous s'il vous plaît immédiatement par le courrier électronique de réponse pour que nous puissions corriger nos dossiers intérieurs. Effacez s'il vous plaît alors le message original (en incluant n'importe quels attachements) dans son ensemble. Merci.
|
|
|
Re: Grails console issuesIf the Album class is in a package you'll need to import it:
import com.foo.Album def album = Album.findByGenre("Rock") Burt > Hi, > > > > I am using grails 1.1.1 and working through Chapter 9 of The definitive > guide to Grails. There is mention of the grails console and how it can > be used to test GORM dynamic finder methods on your domain model. > > > > I started grails console and when I try to execute the following code it > fails: > > > > def album = Album.findByGenre("Rock") > > > > Output: > > > > groovy> def album = Album.findByGenre("Rock") > > > > Exception thrown: No such property: Album for class: ConsoleScript0 > > > > groovy.lang.MissingPropertyException: No such property: Album for class: > ConsoleScript0 > > > > at ConsoleScript0.run(ConsoleScript0:1) > > > > > > Is there anything I might have missed? > > > > Thanks! > > Guillaume Jeudy - JAVA DEVELOPER > Java and Open Source Application Development - Montreal Solutions Centre > 1801, McGill College Avenue, Suite 1100 > Montreal, QC, H3A 2N4 > > gjeudy@... <mailto:gjeudy@...> > W: +1-514-840-6329 F: +1-514-840-6241 > > > > > > ____________________________________________________________________________________________________ > This electronic mail (including any attachments) may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic email or its contents (including any attachments) by persons other than the intended recipient(s) is strictly prohibited. If you have received this message in error, please notify us immediately by reply email so that we may correct our internal records. Please then delete the original message (including any attachments) in its entirety. Thank you. > > > > Ce courrier électronique (en incluant n'importe quels attachements) peut contenir des renseignements > qui sont donnés le privilège, confidentiel, et-ou protégés autrement de la divulgation à quelqu'un autre > que son destinataire (s) voulu. N'importe quelle diffusion ou utilisation de ce courrier électronique > électronique ou de ses contenus (en incluant n'importe quels attachements) par les personnes autre que > le destinataire (s) voulu sont sévèrement interdits. Si vous avez reçu ce message par erreur, notifiez-nous > s'il vous plaît immédiatement par le courrier électronique de réponse pour que nous puissions corriger nos > dossiers intérieurs. Effacez s'il vous plaît alors le message original (en incluant n'importe quels attachements) > dans son ensemble. Merci. > > > mailto:douellet@... > |
|
|
RE: Grails console issuesThanks that did it!
Sorry missed that one. Guillaume Jeudy - JAVA DEVELOPER Java and Open Source Application Development - Montreal Solutions Centre 1801, McGill College Avenue, Suite 1100 Montreal, QC, H3A 2N4 gjeudy@... W: +1-514-840-6329 F: +1-514-840-6241 -----Original Message----- From: Burt Beckwith [mailto:burt@...] Sent: Friday, November 06, 2009 2:01 PM To: user@... Subject: Re: [grails-user] Grails console issues If the Album class is in a package you'll need to import it: import com.foo.Album def album = Album.findByGenre("Rock") Burt > Hi, > > > > I am using grails 1.1.1 and working through Chapter 9 of The definitive > guide to Grails. There is mention of the grails console and how it can > be used to test GORM dynamic finder methods on your domain model. > > > > I started grails console and when I try to execute the following code it > fails: > > > > def album = Album.findByGenre("Rock") > > > > Output: > > > > groovy> def album = Album.findByGenre("Rock") > > > > Exception thrown: No such property: Album for class: ConsoleScript0 > > > > groovy.lang.MissingPropertyException: No such property: Album for class: > ConsoleScript0 > > > > at ConsoleScript0.run(ConsoleScript0:1) > > > > > > Is there anything I might have missed? > > > > Thanks! > > Guillaume Jeudy - JAVA DEVELOPER > Java and Open Source Application Development - Montreal Solutions Centre > 1801, McGill College Avenue, Suite 1100 > Montreal, QC, H3A 2N4 > > gjeudy@... <mailto:gjeudy@...> > W: +1-514-840-6329 F: +1-514-840-6241 > > > > > > ____________________________________________________________________________________________________ > This electronic mail (including any attachments) may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic email or its contents (including any attachments) by persons other than the intended recipient(s) is strictly prohibited. If you have received this message in error, please notify us immediately by reply email so that we may correct our internal records. Please then delete the original message (including any attachments) in its entirety. Thank you. > > > > Ce courrier électronique (en incluant n'importe quels attachements) peut contenir des renseignements > qui sont donnés le privilège, confidentiel, et-ou protégés autrement de la divulgation à quelqu'un autre > que son destinataire (s) voulu. N'importe quelle diffusion ou utilisation de ce courrier électronique > électronique ou de ses contenus (en incluant n'importe quels attachements) par les personnes autre que > le destinataire (s) voulu sont sévèrement interdits. Si vous avez reçu ce message par erreur, notifiez-nous > s'il vous plaît immédiatement par le courrier électronique de réponse pour que nous puissions corriger nos > dossiers intérieurs. Effacez s'il vous plaît alors le message original (en incluant n'importe quels attachements) > dans son ensemble. Merci. > > > mailto:douellet@... > ____________________________________________________________________________________________________ This electronic mail (including any attachments) may contain information that is privileged, confidential, and/or otherwise protected from disclosure to anyone other than its intended recipient(s). Any dissemination or use of this electronic email or its contents (including any attachments) by persons other than the intended recipient(s) is strictly prohibited. If you have received this message in error, please notify us immediately by reply email so that we may correct our internal records. Please then delete the original message (including any attachments) in its entirety. Thank you. Ce courrier électronique (en incluant n'importe quels attachements) peut contenir des renseignements qui sont donnés le privilège, confidentiel, et-ou protégés autrement de la divulgation à quelqu'un autre que son destinataire (s) voulu. N'importe quelle diffusion ou utilisation de ce courrier électronique électronique ou de ses contenus (en incluant n'importe quels attachements) par les personnes autre que le destinataire (s) voulu sont sévèrement interdits. Si vous avez reçu ce message par erreur, notifiez-nous s'il vous plaît immédiatement par le courrier électronique de réponse pour que nous puissions corriger nos dossiers intérieurs. Effacez s'il vous plaît alors le message original (en incluant n'importe quels attachements) dans son ensemble. Merci. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |