I am having a problem where it would appear seam is mangling some table and column names leading to sql exceptions. I have 2 objects, we'll call them caseFile and form1. They have a 1 to 1 relationship, I know in a relational database this is unusual, but I need to keep my options open in case I need to go to a 1 to Many. They are related based on a caseFileId. The CaseFile is attached to a CASE_FILE
table with the id column named CASE_FILE_ID
, the form1 object is connected to FORM_PART_1
with the related id being CASE_FILE_ID
. The problem is, when I got to display the caseFile, and it attempts to load the form data for it, I get this exception:
ORA-00904: "FORMPART3X2_"."CASEFILEID": invalid identifier
@Entity
@Table(name="CASE_FILES")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
@Audited
@Restrict
public class CaseFile extends AbstractAuditable implements Serializable {
...
@OneToOne(optional=true)
@JoinColumn(
name="CASE_FILE_ID", nullable=false)
public FormPart3 getFormPart3() {
return formPart3;
}
...
}
@Entity
@Table(name = "FORM_PART_3")
@Audited
public class FormPart3 {
...
@OneToOne(optional=true)
@JoinColumn(
name="CASE_FILE_ID", nullable=false)
public CaseFile getCaseFile() {
return caseFile;
}
...
}