RE: Error with nested class
"Robert Giddings" <[email protected]> Mon, 10 Sep 2007 15:58:27 +0100
| Newsgroups | gmane.comp.jakarta.ojb.user |
|---|---|
| Message-ID | <000001c7f3bb$0c2edc20$0600a8c0@zaphod> |
Thanks -----Original Message----- From: Armin Waibel [mailto:[email protected]] Sent: 10 September 2007 13:05 To: OJB Users List Subject: Re: Error with nested class Hi Robert, Robert Giddings wrote: > Hi Armin, > > Here is the code of the class and inner class in question. > > Rob > > package com.netcase.netspat.recordSystem.bo; > > import com.netcase.bo.BaseObject; > > public class Country extends BaseObject { > ... > /* > * Nested > */ > > /** > * @ojb.nested > * @ojb.modify-nested name="id" > * primarykey="" > */ > private CountryDateSet publicationDates; > ... > > /* > * Constructors > */ > > public Country() { > super(); > } > ... > > > public class CountryDateSet extends BaseObject { > > /* > * Fields > */ OJB can't instantiate a non-static inner class. Declare CountryDateSet as static inner class - this should solve the problem (this is only possible if CountryDateSet doesn't use access to outer class Country members - I don't check this). regards, Armin --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.485 / Virus Database: 269.13.12/997 - Release Date: 09/09/2007 10:17