hi ,
I have a some tables with no primary key, I'm mapping jpa entity beans, but it gives me error because I need to have a primary key. I was looking at Generated primary keys but i believe they require me to have a separate table in the database or and Id field in the table, but i cannot create any table in database or any new column because some dba issues. So i need to work around and simply insert data to those tables with no primary key. can someone tell me what is the best solution for this type of scenario.
package ejb.entity.cba;
import java.io.Serializable;
import java.sql.Date
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import java.io.Serializable;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Table(name = "OCD")
public class CBAOutlineCertifiedDetail implements Serializable {
//columns with no primary key
private String accountNumber;
private String accountingLineItem;
private int cbaId;
//getters and setter
}
..............
Edited by: s_dhillon on Mar 10, 2010 10:53 PM