[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: Problem with Foreign Composite Key sharing a field with a Primary Composite Key?

Reordering the columns has no affect.

Removing the ", insertable=false, updatable=false" from the owner causes the insert person query to fail:

company = new Company();
company.setOwner("USA");
company.setComp_id("2000034");
company.setC_name("Spacely Sprockets");
em.persist(company);
Person person = new Person();
person.setOwner("USA");
person.setPersonid("20000A2");
person.setP_fname("George");
person.setP_sname("Jetson");
person.setCompany(company);
em.persist(person);


javax.servlet.ServletException: javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00957: duplicate column name


Error Code: 957
Call: INSERT INTO PERSON (PERSONID, OWNER, P_FNAME, P_SNAME, comp_id, owner) VALUES (?, ?, ?, ?, ?, ?)
bind => [20000A2, USA, George, Jetson, 2000034, USA]


I will file a bug.