openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Héctor López Fernández (JIRA) <>
Subject [jira] [Created] (OPENJPA-2367) @Column annotation is ignored when applied onto a setter
Date Wed, 10 Apr 2013 01:48:15 GMT
Héctor López Fernández created OPENJPA-2367:

             Summary: @Column annotation is ignored when applied onto a setter
                 Key: OPENJPA-2367
             Project: OpenJPA
          Issue Type: Bug
          Components: jpa
    Affects Versions: 2.2.1
         Environment: JRE 1.7, Eclipse Juno, Ant enhancer, Tomcat 7, MySQL 5.5
            Reporter: Héctor López Fernández
            Priority: Minor

When mixing AccessTypes (ie. Entity set to FIELD and some member set to PROPERTY), @Column(name="foo")
annotation is ignored if it is applied to a setter (i'm supposing that a getter would yield
same results). This translates to an SQL using the field name as the column name.

This mapping:

public class Post extends PersistentObject {

	public void setPublicationDateAsLong(long date) { ... }


throws this exception:

org.apache.openjpa.persistence.PersistenceException: Unknown column 't0.publicationDateAsLong'
in 'field list'

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message