Search code examples
javagrailsgrails-orm

Association, Aggregation, Composition in GORM


Say, if two classes A,B are in relation like A hasMany B. In GORM how to specify these relationships between domain classes

  1. Association
  2. Aggregation
  3. Composition

Solution

  • If I understand the question correctly, you wanted to know which one the above options is signified by a hasMany relationship?

    The answer is "Association". You can go through GORM reference document for details about Association and Composition.