[hibernate-issues] [Hibernate-JIRA] Created: (ANN-689) @JoinColumn not quoted for Oracle dialect
Earnie Dyke (JIRA)
noreply at atlassian.com
Wed Jan 9 08:28:57 EST 2008
@JoinColumn not quoted for Oracle dialect
-----------------------------------------
Key: ANN-689
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-689
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.2.1
Environment: Oracle 10g XE
Reporter: Earnie Dyke
Within an @Entity I have the following:
@ManyToOne(cascase = {}, fetch = FecthType.Lazy)
@JoinColumn(name = "`PresentationId`") // Notice the backticks
public Presentation getPresentation() {
return this.presentation;
}
the generated SQL for a load is:
select ... from PRESENTATION presentati0_ left outer join CSESSION csessions1_ on presentati0_."Id"=csessions1_.PresentationId where ...
Notice that PresentationId in csessions1_.PresentationId is NOT quoted. This causes an exception from Oracle:
java.sql.SQLException: ORA-00904: "CSESSIONS1_"."PRESENTATIONID": invalid identifier.
I added the backticks to all @Column annotations and they work. Also PresentationId is not quoted in the SELECT list either.
Earnie!
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list