Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2B3CC975D for ; Fri, 30 Dec 2011 19:54:56 +0000 (UTC) Received: (qmail 75871 invoked by uid 500); 30 Dec 2011 19:54:56 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 75726 invoked by uid 500); 30 Dec 2011 19:54:54 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 75718 invoked by uid 99); 30 Dec 2011 19:54:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2011 19:54:54 +0000 X-ASF-Spam-Status: No, hits=-2001.3 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2011 19:54:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CAB4D131947 for ; Fri, 30 Dec 2011 19:54:30 +0000 (UTC) Date: Fri, 30 Dec 2011 19:54:30 +0000 (UTC) From: "Jacob Nowosatka (Updated) (JIRA)" To: dev@openjpa.apache.org Message-ID: <616740793.54402.1325274870831.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <693587002.22950.1322594860425.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (OPENJPA-2083) Unmapped fields silently treated as transient MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-2083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacob Nowosatka updated OPENJPA-2083: ------------------------------------- Attachment: OPENJPA-2083.patch Patch adds a warning message when dealing with unmapped non-primitive fields stating that "the fields are not default persistent and do not have any annotations. and will be treated as non-persistent. If they fields should be persistent, annotate them with the appropriately. Otherwise, mark them as transient." > Unmapped fields silently treated as transient > --------------------------------------------- > > Key: OPENJPA-2083 > URL: https://issues.apache.org/jira/browse/OPENJPA-2083 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Affects Versions: 2.1.1 > Reporter: Harald Wellmann > Priority: Minor > Attachments: OPENJPA-2083.patch > > > The JPA 2.0 spec requires any non-static non-transient entity field to be persistent unless explicitly mapped as transient by a @Transient annotation or the equivalent XML. > OpenJPA 2.1.1 silently treats some unmapped non-primitive fields as transient instead of throwing an exception or at least logging a warning. > Example: > @Entity > public class City { > @Id > private String name; > private Integer population; > private java.util.concurrent.Executor executor; > // getters and setters > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira