[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3034) Cannot avoid extra query due to one-to-one mapping
tamal das (JIRA)
noreply at atlassian.com
Fri Dec 28 10:43:05 EST 2007
Cannot avoid extra query due to one-to-one mapping
--------------------------------------------------
Key: HHH-3034
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3034
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Affects Versions: 3.2.1
Environment: Hibernate : 3.2.1 ga
Database : Oracle 10g
Reporter: tamal das
Attachments: jra issue.zip
Hi I have 4 table.Namely - Tkt,BoxTkt,CusipTkt and TktAudTrl.
Tkt has 1-1 relationship with both BoxTkt and CusipTkt.
Tkt has 1- many relationship with TktAudTrl
BoxTkt and CusipTkt have share the same primary key of Tkt.
Now when I want to perform this following hql :
from TktAudTrl at join at.tkt where at.tkt.tktNo = ?
select query for both BoxTkt and CusipTkt is also fired.
I can stop that by making constrained = true in tkt.hbm.xml in one to one mapping for boxtkt.
But this makes BoxTKt anad CusipTkt NOT NULL in Tkt which is not the case.
How can I stop this?
--
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