Java Mailing List Archive

Home » users.openjpa »

Help needed with "Fields 'xxx' are not a default persistent type"

Glen Mazza


Replies: Find Java Web Hosting

Author LoginPost Reply
Hi, I'm new to OpenJPA (and JPA) and trying to create the entity-mapping
XML files (classes are unannotated POJOs) for a simple parent-child
database relationship[1] (parent is department, child is employees
working at that department) Right now, here's what I have for the
mapping files:[2] (classes are here: [3]).

While my TestClass[4] (which accesses just the department table right
now) runs fine I'm getting this warning message while running it:
"2213 CompanyPU WARN  [main] openjpa.Runtime - Fields "employees" are
not a default persistent type, and do not have any annotations
indicating their persistence strategy. They will be treated as
non-persistent. If you intended for these fields to be persistent, be
sure to annotate them appropriately. Otherwise annotate them with

Google is returning many examples of others with this error, but I'm
still not sure what I'm doing wrong. In the department.orm.xml, I can't
map "employees" as Transient because it is already mapped as
<one-to-many/>, which is AFAICT the right mapping to do. Basically, what
do I have to fix my department.orm.xml[2] (or class[3])
in order to get rid of the above warning message?



©2008 - Jax Systems, LLC, U.S.A.