user711189
user711189

Reputation: 4483

beginner groovy-grails, object type statement missing?

Im new to groovy-grails.

The following is a statement in the domain level :

static hasMany = [ posts : Post, tags : Tag, following : UserAccount ]

what kind of object is this? I.e. is it a groovy map? And how the object type can be missing from the statement?

Upvotes: 0

Views: 112

Answers (1)

tim_yates
tim_yates

Reputation: 171084

Yes, that's a map with Strings as the keys, and classes as the values.

In groovy, you don't need to declare the type of variables. If you're used to java, think of it as a static variable with type Object

Upvotes: 5

Related Questions