5

To get around this I have to move such classes to src/groovy. It would be nice to have all of my domain model classes in the domains directory rather than split them up.

Update 1: This is a popular (look for GRAILS-2515) requested feature on the Grails Jira page. If anyone is interested in this feature you can vote and track it here.

Update on GRAILS-2515: static mapWith = "none" should do the trick in 1.3.5.

3 Answers3

4

It is only possible to mark certain properties on the domain object as 'transient' so that they are not persisted to the database. Otherwise, all domain objects are persisted.

UPDATE

With the most recent release of Grails 1.3.5 (released Oct 4 2010) it is now possible to disable persistence of a domain class. Add the following to the domain class:

static mapWith = "none"

There is a JIRA ticket with further details.

mfloryan
  • 7,667
  • 4
  • 31
  • 44
3

If I might add 2 words to your question: against convention! Grails is all about convention over configuration and doing what you'd like to do is against it.

Matthias Hryniszak
  • 3,099
  • 3
  • 36
  • 51
2

No. It is not.

Tomasi
  • 2,517
  • 6
  • 31
  • 43