Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails: Creating classes that you do not want to store on the DB

In grails is creating a new domain class and never persisting any objects to the db, the best way to create a class that you don't want to store in the db?

like image 293
Orca Ninja Avatar asked Dec 06 '22 15:12

Orca Ninja


2 Answers

Grails provide the src directory to develop some utility classes and other artifacts. The src directory it not persisted.

src - Supporting sources
    groovy - Other Groovy sources
    java - Other Java sources
like image 162
Arturo Herrero Avatar answered Dec 11 '22 10:12

Arturo Herrero


define static mapWith="none" inside your class in grails-app/domain folder

like image 22
jenk Avatar answered Dec 11 '22 08:12

jenk