@VersionColumns annotation throws exception when multiple columns are specified
-------------------------------------------------------------------------------
Key: OPENJPA-697
URL: https://issues.apache.org/jira/browse/OPENJPA-697
Project: OpenJPA
Issue Type: Bug
Components: jpa
Affects Versions: 1.2.0
Reporter: Dinkar Rao
Priority: Minor
The OpenJPA manual very briefly talks about the @VersionColumns annotation, but
its usage is not clear. I have an entity that tries to use this annotation
(below), but I get back an exception when I run the mapping tool against it:
"Exception in thread "main" <openjpa-1.3.0-SNAPSHOT-runknown fatal user error>
org.apache.openjpa.util.MetaDataException: For "entities.Employee<version>",
expected 1 column(s),
but found 2."
@Entity
@VersionColumns([EMAIL PROTECTED](name="vcol1"),@VersionColumn(name="vcol2")})
@SecondaryTable(name="EADDRESS", [EMAIL PROTECTED](name="EMPID"))
public class Employee {
@Id @GeneratedValue(strategy=GenerationType.AUTO)
private int empid;
private String name;
@Column(table="EADDRESS")
private String street1;
@Column(table="EADDRESS")
private String street2;
@Column(table="EADDRESS")
private String city;
@Column(table="EADDRESS")
private int zipcode;
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.