Looking at the mappings for these would help solve this.
maskkkk wrote:
I have a base class (OSBBaseObject) which is extended by both Chapter and
Verse
(The mappings for the parent are defined in the OSBBaseObject)

There is a parent-child relationship between Chapter and Verse.....
(many-to-one), now when I ask the Verse for the parent Chapter (see bellow)

asking verse for it's chapter wrote:
        public Chapter getChapter()
        {

                parentChapter = (Chapter) baseObj;

                return parentChapter;
        }


I recieve the folllowing exception:


The Error I get wrote:
com.me.model.OSBBaseObject$$EnhancerByCGLIB$$a602890b

java.lang.ClassCastException:
com.me.model.OSBBaseObject$$EnhancerByCGLIB$$a602890b at
com.me.model.Verse.getChapter(Verse.java:59) at
com.me.dao.OsbBaseObjectDaoTest.testGetVerseAssociations(OsbBaseObjectDaoTest.java:129)
at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)


Thank you, Andrew J. Leer

Reply via email to