nstanceof doesn't seem to work :- I couldn't work out how to create a finder <<Service>> to do this, so I had to resort
to using a plain old hibernate session... Query query = session.createQuery("from PublicationImpl"); for( Iterator it = query.iterate(); it.hasNext(); ){ Object o = it.next(); if( o instanceof Book ){ System.out.println("book: " + o.getClass()); } else if ( o instanceof Album ){ System.out.println("album: " + o.getClass()); } else if( o instanceof BookImpl ){ System.out.println("bookImpl: " + o.getClass()); } else if ( o instanceof AlbumImpl ){ System.out.println("albumImpl: " + o.getClass()); } else { System.out.println("publication: " + o.getClass()); } } prints this. publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 publication: class com.netavail.devel.uml.PublicationImpl$$EnhancerByCGLIB$$cff07381 Even if this did work, I still need to store types of Publication for which I might not have a full object -- i.e., I'd need to use them a a Publication rather than as a Book or Album, etc... I know I can hack andromda to do what I want, but I'd _much_ rather be able to contribute that work back into andromda for others' benefit. _________________________________________________________ Reply to the post : http://galaxy.andromda.org/forum/viewtopic.php?p=2345#2345 Posting to http://forum.andromda.org/ is preferred over posting to the mailing list! ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Andromda-user mailing list Andromda-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/andromda-user