4
votes

I have a domain class in grails... How do I get gorm to leave out this entity when it create the db? Just leave it alone.

3

3 Answers

13
votes

If i understood, u want not create table from domain class? If yes, use this code inside domain class:

static mapWith = "none" // disable persisting into database
9
votes

Sounds like you don't need it to be a domain class then. You could just make it a POGO in the src/groovy file. If my assumptions here are wrong please explain further what you're trying to accomplish.

2
votes

You could use Command Objects.

http://grails.org/doc/latest/guide/single.html#commandObjects

They provide the data binding and validation of domain classes, but do not map to the database.