loldrup
unread,Jul 18, 2011, 12:16:16 PM7/18/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Nimble
Hi
Nimble has this group-class 'Group.groovy'.
My application will use groups heavily, so I would like to tinker with
the Group class. Whats the best way to do this? Do I just edit the
Nimble group class or do make my own group class and make it extend
Nimble's group-class? The problem with extending it with my own group-
class is that I want to define groups recursively, using the composite
pattern, like this:
class Group extends Asset {
...
static hasMany = [ assets : Asset ]
}
class Person extends Asset {
...
}
As can be seen, this involves extending an interface 'Asset'. Then the
problem is that Group cannot simultaneously extend 'Asset' and the
nimble group class.
Whats a grails-programmer to do? I guess tinkering with Nimbles own
group-class might be unhealthy in the long run...
Jon