1

I have two mapped classes: BaseClass and ConcreteClass extends BaseClass, both are stored into same collections.

Base class have an field, stored as embedded value - object with class Dimensions, that is configured as embedded by:

class BaseClass {
    Dimensions dimensions

    static embedded = ['dimensions']
}

btw, when i'm trying to load it by BaseClass.get(id) it fails with NoSuchBeanDefinitionException: No bean named 'my.package.Dimensions' is defined

and, also, same problem when this class, with embedded field, becomes an embedded value inside an another object. I mean:

class OtherClass {
   BaseClass baseClass

   static embedded = ['baseClass']
}

How to configure those embedded objects/fields?

As MongoDB is a document-oriented storage, it's very commons situation to have deep objects structures for a stored document. But I can't figure out how it can be done with gorm-mongodb plugin

Igor Artamonov
  • 35,450
  • 10
  • 82
  • 113
  • You've got a spelling error. The first time, its spelled `dimesions`, and the second time its spelled `dimensions`. Did you type that in, or is that copied from your code? – Pat Jul 21 '11 at 17:37
  • Can you provide some information about the Dimensions class? Is it a grails domain class, and what does its definition look like? – Josh Diehl Sep 13 '11 at 03:23

0 Answers0