You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Dinkar Rao (JIRA)" <ji...@apache.org> on 2008/08/22 05:48:44 UTC
[jira] Created: (OPENJPA-697) @VersionColumns annotation throws
exception when multiple columns are specified
@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({@VersionColumn(name="vcol1"),@VersionColumn(name="vcol2")})
@SecondaryTable(name="EADDRESS", pkJoinColumns=@PrimaryKeyJoinColumn(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.
[jira] Updated: (OPENJPA-697) @VersionColumns annotation throws
exception when multiple columns are specified
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar updated OPENJPA-697:
----------------------------------
Priority: Major (was: Minor)
Changes the priority as the related changes to support multi-column versioning requires new capabilities.
> @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
> Assignee: Pinaki Poddar
> Fix For: 1.3.0
>
>
> 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({@VersionColumn(name="vcol1"),@VersionColumn(name="vcol2")})
> @SecondaryTable(name="EADDRESS", pkJoinColumns=@PrimaryKeyJoinColumn(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.
[jira] Resolved: (OPENJPA-697) @VersionColumns annotation throws
exception when multiple columns are specified
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar resolved OPENJPA-697.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.3.0
> @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
> Assignee: Pinaki Poddar
> Priority: Minor
> Fix For: 1.3.0
>
>
> 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({@VersionColumn(name="vcol1"),@VersionColumn(name="vcol2")})
> @SecondaryTable(name="EADDRESS", pkJoinColumns=@PrimaryKeyJoinColumn(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.
[jira] Assigned: (OPENJPA-697) @VersionColumns annotation throws
exception when multiple columns are specified
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar reassigned OPENJPA-697:
-------------------------------------
Assignee: Pinaki Poddar
> @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
> Assignee: Pinaki Poddar
> 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({@VersionColumn(name="vcol1"),@VersionColumn(name="vcol2")})
> @SecondaryTable(name="EADDRESS", pkJoinColumns=@PrimaryKeyJoinColumn(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.
[jira] Reopened: (OPENJPA-697) @VersionColumns annotation throws
exception when multiple columns are specified
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar reopened OPENJPA-697:
-----------------------------------
A relevant use case for multi-column versioning is setting version columns across primary and secondary tables. The version strategy and schema definition does not address the case where the columns are spread across multiple tables.
> @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
> Assignee: Pinaki Poddar
> Priority: Minor
> Fix For: 1.3.0
>
>
> 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({@VersionColumn(name="vcol1"),@VersionColumn(name="vcol2")})
> @SecondaryTable(name="EADDRESS", pkJoinColumns=@PrimaryKeyJoinColumn(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.
[jira] Closed: (OPENJPA-697) @VersionColumns annotation throws
exception when multiple columns are specified
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar closed OPENJPA-697.
---------------------------------
Resolution: Fixed
> @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: 2.0.0
> Reporter: Dinkar Rao
> Assignee: Pinaki Poddar
> Fix For: 1.3.0
>
>
> 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({@VersionColumn(name="vcol1"),@VersionColumn(name="vcol2")})
> @SecondaryTable(name="EADDRESS", pkJoinColumns=@PrimaryKeyJoinColumn(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.