From: <leg...@at...> - 2003-08-28 07:45:29
|
The following comment has been added to this issue: Author: Kevin Yeung Created: Thu, 28 Aug 2003 2:44 AM Body: Hi Mark. I realised that after I posted my previous comment. Come to think of it, another way would be to change the way aliases are generated altogether. There is no reason why we must use the format <original_table_name> + <number> + <underscore>. For example, we can use simply T0, T1, T2, T3... With a length of 30, this would give us up to 10^29 aliases without breaching the database limitation. Even a length of 5 gives us 10k aliases. --------------------------------------------------------------------- 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 |