Here is a stripped down version of my grails domain objects:
//this is a lookup table
class PetType {
String description
}
class Family {
static hasMany = [
petTypePreferred:PetType
]
}
In my controller I'm getting returned back from my gsp a parameter string value of 'petTypePreferred'. Knowing that string value, and knowing the Domain class Family, how can I determine the Domain class from the 'petTypePreferred' string value? In grails 2.2.4 the getPropertyByName(String value) method isn't seen as valid on a domain object, even though it's in the javadoc.
So I have String petTypePreferred, and Class Family, but I need to find Class PetType given those 2 pieces of information.