I'd forgotten that I'd asked this! No, it doesn't seem to work as is - when I do a query for all articles, I only get implementations of article back (I'm using the map-each-instance-to-a-different-table approach), rather than the classes that they actually are.
Keith >>> [EMAIL PROTECTED] 18/10/2004 16:24:15 >>> Hello, > -----Original Message----- > For example, with an "article" object that is extended by > "BookArticle" > and "CDArticle" - I want to get a list of all articles, but also to be > able to tell when I iterate through the results what kind of article > each one is... > > Ideally, I could go through the list and check for each > article whether > it is a book or a cd, and cast as neccessary so that I can then access > the specific fields of the object relating to book/cd - Is > this possible > using the current release of OJB? I do not see your problem. Won't "instanceof CDArticle" do the trick? If your articles are mapped to the same table, that table should probably have a column ojbConcreteClass. Look into repository_junit for exmples. Olli -- Oliver Matz ppi Media GmbH Deliusstra�e 10 D-24114 Kiel phone +49 (0) 43 1-53 53-422 fax +49 (0) 43 1-53 53-2 22 email mailto:[EMAIL PROTECTED] web www.ppi.de --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information in this e-mail is confidential and intended to be solely for the use of the addressee(s) and may contain copyright and/or legally privileged information. If you are not the addressee (or responsible for delivery of the message to the addressee) please e-mail us at [EMAIL PROTECTED] and delete the message from your computer; copying, distribution, use or disclosure of its contents is strictly prohibited. As Internet communications are capable of data corruption no responsibility is accepted for changes made to this message after it was sent. For this reason it may be inappropriate to rely on advice contained in any e-mail without obtaining written confirmation of it. In addition, no liability or responsibility is accepted for viruses and it is your responsibility to scan attachments (if any). Please note that for business purposes, outgoing and incoming emails from and to the company may be monitored and recorded. Mouchel Parkman Services Ltd, Registered in England at West Hall, Parvis Road, West Byfleet, Surrey UK KT14 6EZ Registered No : 1686040 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
