I am building a web application with Grails and need to model a complex organisational structure. i.e.
- Organisation
- Department
- Office
- People
And retrieve a list of people at each level of the heirarchy. The problem is that Grails does not seem to have good support for polymorphism (no interfaces, etc) and this is how I would normally go about modelling a structure like this.
How would you model a structure like this in Grails? Do you know of any good examples?
EDIT:
Regarding interfaces JIRA it's not that it doesn't its that from what I read GORM doesn't support them properly yet. And the Reference Guide only mentions abstract classes when related to GORM.
What I am looking for is something like Martin Fowlers Organisational Patterns. I need a way to GetPeople from any level in the heirarchy without having to explicitly traverse the structure and as far as I can see GORM doesn't support this very well.
PS Please prove me wrong I would be very happy.