Hi, It seems that you have WebPage$AccessType in your persistence.xml. You should take it out and only enhance WebPage. OpenJpa will automatically handle enums properly. Regards, Fay
--- On Fri, 1/2/09, Miroslav Šulc <[email protected]> wrote: > From: Miroslav Šulc <[email protected]> > Subject: Type (enum) has no metadata > To: [email protected] > Date: Friday, January 2, 2009, 9:43 AM > Hi, > > I am curious what this message means: > > WARN [main] openjpa.Enhance - Type "class > cz.startnet.eas.entities.websites.WebPage$AccessType" > has no metadata; > enhancing as persistence aware. If you intended for > "class > cz.startnet.eas.entities.websites.WebPage$AccessType" > to be > persistence-capable, then this means that OpenJPA could not > find any > metadata for "class > cz.startnet.eas.entities.websites.WebPage$AccessType". > This can happen > if the directory containing your metadata is not in your > CLASSPATH, or > if your metadata files are not named properly. See the > documentation on > metadata placement for more information. > > WebPage is entity class, AccessType is enum defined inside > WebPage: > > @Entity > public class WebPage ... { > .... > @Basic(optional = false) > @Column(name = "webpageaccesstype", nullable > = false) > private AccessType accessType; > .... > public enum AccessType { > .... > } > } > > According to OpenJPA documentation, enums should be handled > automatically so I do not know what am I doing wrong here. > Anyone can > help me to understand this? > > Thank you. > > Miroslav
