[
https://issues.apache.org/jira/browse/OPENJPA-2401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263671#comment-15263671
]
Francesco Chicchiriccò commented on OPENJPA-2401:
-------------------------------------------------
The WARN message seems to be originating from [this
line|https://github.com/apache/openjpa/blob/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataDefaults.java#L636]:
what is the purpose of reporting such warning? If we do not want to remove it,
can we think of changing the text indicating the possibility that a mapping in
{{orm.xml}} is provided (or similar)?
> "Fields 'xxx' are not a default persistent type" warning message ignoring XML
> configuration.
> --------------------------------------------------------------------------------------------
>
> Key: OPENJPA-2401
> URL: https://issues.apache.org/jira/browse/OPENJPA-2401
> Project: OpenJPA
> Issue Type: Bug
> Components: logging
> Affects Versions: 2.2.2
> Reporter: Glen Mazza
> Priority: Trivial
>
> Hi, unless I set "@OneToMany" as shown here:
> https://github.com/gmazza/blog-samples/blob/master/jpa_and_junit/src/main/java/entities/Department.java#L47
> I'll get this warning message:
> 678 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 @Transient.
> However, I shouldn't have to set that annotation because I've already
> declared one-to-many via XML configuration:
> https://github.com/gmazza/blog-samples/blob/master/jpa_and_junit/src/main/resources/entities/department.orm.xml#L29
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)