Hi boys
a) My Schema is
table Employer
int idPerson (PFK)
int idcompany (PFK)
table Person
int idPerson (PK)
table Company
int idCompany (PK)
b) My Cayenne mapping is
DbEntity Employer's relationships:
toPerson (toDepPk checked)
toCompany (toDepPk checked)
ObjectEntity Employer's relationships:
toPerson ("used for locking" not checked)
toCompany ("used for locking" not checked)
c) My Java code is like:
public Employer employer;
// note: person and company objects are fetched from two comboboxes of DataObjects
.....
employer.setToPerson(person);
employer.setToCompany(company);
// I haven't registered employer. Did I have ?
dataContext.commitChanges();
d) The error is:
INFO QueryLogger: --- will run 2 queries.
INFO QueryLogger: --- transaction started.
INFO QueryLogger: SELECT NEXT_ID FROM AUTO_PK_SUPPORT WHERE TABLE_NAME = 'EMPLOYER'
INFO QueryLogger: *** error.
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -204
Table unknown
AUTO_PK_SUPPORT
At line 1, column 37.
at org.firebirdsql.jdbc.AbstractPreparedStatement.<init>(AbstractPreparedStatement.java:88)
....
e) Question is:
Really I dont need to generate any pk because the table Employer has only two primary foreign keys, so I haven't create the AUTO_PK_SUPPORT table in my DB.
Well, I don't need that table but cayenne is looking for it, why ?
How I can solve that problem ?
Best wishes for the new year
Andrea