1

In a mongo-only setup we need to use a String id (or ObjectId):

class SomeDomain {
  String id
  ///
}

in all domain classes of the app.

Is there a config shortcut to set the default String id overriding GORM's default Long id for all domain classes?

injecteer
  • 20,038
  • 4
  • 45
  • 89

1 Answers1

0

There's no way that I know of other than by defining this in a base class or trait, e.g.

trait Persistent {
  String id
}

class SomeDomain implements Persistent {
  // other persistent properties
}
Dónal
  • 185,044
  • 174
  • 569
  • 824