hibernate - Grails 3 Not Returning Correct Class -
i have grails/groovy code developed under grails 2 , refactored grails 3. running in intellij idea (and on our tomcat server), source object documentsource doesn't identified one. instead identified base source class. code returned expected results in grails 2, has me stumped in grails 3.
inspecting source object in debugger, top level fields null type , profile , metaclass source. drilling down under target->handler, expected values found type, profile, documentid, documentname, , metaclass.
i'm not sure if related gorm/hibernate. we've experimented using different version , i'm not sure impact there. ideas?
// base domain class class source { string type profile profile } // extended domain class class documentsource extends source { string documentid string documentname } // further extended domain class class documentlocatorsource extends documentsource { string locatorid } // snippet service class ... sourcereferences.each { sourcereference -> def source = sourcereference.source marshalledresponse response = new marshalledresponse() response.sourceid = source.id if(source instanceof source) { // get's here! cdssource.sourceid = source.id } if(source instanceof documentsource) { // never get's here. :-( response.documentid = ((documentsource)source).documentid response.documentname = ((documentsource)source).documentname } if(source instanceof documentlocatorsource) { response.locatorid = ((documentlocatorsource)source).locatorid } } ...
wiki
Comments
Post a Comment