[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-689) @JoinColumn not quoted for Oracle dialect
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Thu Mar 6 22:37:33 EST 2008
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Diego Pires Plentz resolved ANN-689.
------------------------------------
Assignee: Diego Pires Plentz
Resolution: Cannot Reproduce
> @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
> Assignee: Diego Pires Plentz
>
> 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