Hello all,
I am trying to set up a few domain classes. I will explain it in english, and I am wondering how the domain would be set up in grails. Capitalized words are my domains
An Employee has an Education. An Employee has many Employer (past and present). An Employee had one or many Project for each Employer. Project have a Role, Client...etc
Now my question is, when for example, I define Employer, will I put
hasMany = [projects:Project]
and ALSO in Project put
belongsTo = [employer:Employer, employee:Employee, client:Client]
Mind you - many employees may have worked on the same project, so I might want to figure out a way to define that?
Would I also put in Employer:
ArrayList<Project> project = new ArrayList();
static hasMany = [projects:Project]
Or is that redundant?