Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Q - How do I store an instance of a non domain class in a domain class

Bilal Sheikh

2008-09-02

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

In my grails project I have a domain class that needs to store an instance of some other class from a library.  However, for I get a "refers to an unmapped class" error when do a grails run-app.  Here is an example of what my domain class looks like:

<code>

import com.mygadgets.bar

class Foo {
  String name
  Bar myBar

  String toString () {
    return name
  }
}


</code>

Is there a way for me to store a Bar object (or a list of Bar objects), in my Foo domain class, if the Bar class is not a domain class?

Thanks,
Bilal
©2008 gg3721.com - Jax Systems, LLC, U.S.A.