|
From: <leg...@at...> - 2003-08-27 09:53:32
|
The following comment has been added to this issue:
Author: Kevin Yeung
Created: Wed, 27 Aug 2003 4:53 AM
Body:
I did a quick hack with cirrus.hibernate.helpers.StringHelper.suffix() to return the first 30 characters (or less). And it seems to work. Can anyone advise if I'm breaking anything?
Of course it'd be prudent to set the limit based on the dialect (Oracle has a limit of 30 so I'm hardcoding it for myself).
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-244
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-244
Summary: Hibernate creates alias identifiers that are too long
Type: Bug
Status: Unassigned
Priority: Major
Project: Hibernate2
Components:
core
Versions:
2.0.2
Assignee:
Reporter: Mark Woon
Created: Mon, 11 Aug 2003 1:17 AM
Updated: Mon, 11 Aug 2003 5:21 AM
Environment: Oracle 9.0.2.
Description:
After switching to Hibernate 2 I find that Hibernate is still creating alias identifiers that are too long.
The HQL query that's causing it:
select freqInSs, freqInRae, freqInSs.allele
from DbVariantPosition as varPos,
DbVariantAllele as varAl,
DbAlleleFrequencyInSampleSet as freqInSs,
DbAlleleFrequencyInRaceAndEthnicity as freqInRae
where varPos.goldenPathPosition = ?
and varPos.id != ?
order by freqInSs, freqInRae
The SQL query that gets generated:
select dballele2_.alleleFreqInSampleSetsId as alleleFreqInSampleSetsId0_, dballele3_.alleleFreqInSSRaceEthnicityId as alleleFreqInSSRaceEthnicityId1_, dballele2_.variantPositionId as variantP2_0_, dballele2_.sampleSetId as sampleSe3_0_, dballele2_.allele as allele0_, dballele2_.totalObserved as totalObs5_0_, dballele2_.frequency as frequency0_, dballele3_.alleleFreqInSampleSetId as alleleFr2_1_, dballele3_.racialClassId as racialCl3_1_, dballele3_.ethnicClassId as ethnicCl4_1_, dballele3_.totalObserved as totalObs5_1_, dballele3_.frequency as frequency1_, dballele2_.alleleFreqInSampleSetsId as x0_0_, dballele3_.alleleFreqInSSRaceEthnicityId as x1_0_, dballele2_.allele as x2_0_ from VariantPositions dbvarian0_, VariantAlleles dbvarian1_, AlleleFreqInSampleSets dballele2_, AlleleFreqInSSRaceEthnicity dballele3_ where (dbvarian0_.goldenPathPosition=? )and(dbvarian0_.variantPositionId!=? ) order by dballele2_.alleleFreqInSampleSetsId , dballele3_.alleleFreqInSSRaceEthnicityId
The offending alias identifier is "alleleFreqInSSRaceEthnicityId1_" which is 31 characters long -- one more that Oracle's max identifier length.
Is this a known problem? I can attach my mappings if it will help...
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|