Hi,
To make a long story short, H3 generates the same column alias twice in the one SQL. Sybase doesn't like that. Here's the two column involved in the problem:
1- Organization.OrgId
2- orgdeptlocation.Org_Dept_Loc_ID
H3 generates "Org1_3_" as alias for both columns.
Below you'll see all the mapping files and the H3 SQL involved in this issue.
This issue was taken care of in an earlier version (see JIRA) but somehow is back in H3.
Hope someone can help me. Thx
JDBC Exception: Select expression results in more than one column having same name. Column name 'Org1_3_' is specified more than once.
Hibernate version: 3.1 rc1
Mapping documents:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping default-lazy="true">
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class name="hibernate.Form" table="FORMS" lazy="true">
<id name="formId" type="java.lang.Long" column="Form_ID" unsaved-value="null">
<generator class="native"/>
</id>
<property name="cid" type="java.lang.Integer" column="CID" not-null="true" length="6" insert="false" update="false"/>
<property name="formLanguage" type="java.lang.String" column="Form_Language" not-null="true" length="1"/>
<property name="formStatus" type="java.lang.String" column="Form_Status" not-null="true" length="1"/>
<property name="transferredToAmisDate" type="java.sql.Timestamp" column="Transferred_To_AMIS_Date" length="23"/>
<property name="transferredToAmisIndicator" type="java.lang.String" column="Transferred_To_AMIS_Indicator" length="1"/>
<property name="createUserId" type="java.lang.String" column="Create_User_ID" not-null="true" length="3" insert="false" update="false"/>
<property name="createDate" type="java.sql.Timestamp" column="Create_Date" not-null="true" length="23" insert="false" update="false"/>
<property name="changeUserId" type="java.lang.String" column="Change_User_ID" not-null="true" length="3" insert="false" update="false"/>
<property name="changeDate" type="java.util.Date" column="Change_Date" not-null="true" length="23" insert="false" update="false"/>
<!-- associations -->
<!-- bi-directional many-to-one association to Application -->
<many-to-one name="application" class="hibernate.Application" column="Appl_ID"></many-to-one>
<!-- bi-directional many-to-one association to WebSubsystem -->
<many-to-one name="webSubsystem" class="hibernate.WebSubsystem" not-null="true" column="Subsystem_ID"> </many-to-one>
<!-- <property name="cid" type="java.lang.Integer" column="CID" not-null="true" length="6"/> -->
<many-to-one name="person" class="hibernate.Person" column="CID"></many-to-one>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping default-lazy="true">
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
<<<<<<< Person.hbm.xml
-->
<class name="hibernate.Person" table="PERSON" lazy="true">
<id name="cid" type="java.lang.Integer" column="CID">
<generator class="native"/>
</id>
<property name="amisCid" type="java.lang.Integer" column="Amis_CID" length="6"/>
<property name="familyName" type="java.lang.String" column="Family_Name" length="30"/>
<property name="givenName" type="java.lang.String" column="Given_Name" length="30"/>
<property name="initials" type="java.lang.String" column="Initials" length="4"/>
<property name="salutation" type="java.lang.Integer" column="Salutation" length="4"/>
<property name="yearOfBirth" type="java.lang.Short" column="Year_Of_Birth" length="5"/>
<property name="sin" type="java.lang.Integer" column="SIN" length="9"/>
<property name="sshrcEmployeeInd" type="java.lang.String" column="SSHRC_Employee_Ind" length="1"/>
<property name="personStatusCode" type="java.lang.Integer" column="Person_Status_Code" length="4"/>
<property name="statusChangeDate" type="java.sql.Timestamp" column="Status_Change_Date" length="23"/>
<property name="primaryMailAddrId" type="java.lang.Integer" column="Primary_Mail_Addr_ID" length="6"/>
<property name="primaryMailAddrPositionId" type="java.lang.Integer" column="Primary_Mail_Addr_Position_ID" length="6"/>
<property name="assessorInvitationInd" type="java.lang.String" column="Assessor_Invitation_Ind" length="1"/>
<property name="assessorWillingToServeInd" type="java.lang.String" column="Assessor_Willing_To_Serve_Ind" length="1"/>
<property name="assessorOrgId" type="java.lang.Integer" column="Assessor_Org_ID" length="8"/>
<property name="assessorNominatedBy" type="java.lang.String" column="Assessor_Nominated_By" length="40"/>
<property name="assessorNominatedDate" type="java.sql.Timestamp" column="Assessor_Nominated_Date" length="23"/>
<property name="assessorUnavailableFromDate" type="java.sql.Timestamp" column="Assessor_Unavailable_From_Date" length="23"/>
<property name="assessorUnavailableToDate" type="java.sql.Timestamp" column="Assessor_Unavailable_To_Date" length="23"/>
<property name="assessorRecommendationInd" type="java.lang.String" column="Assessor_Recommendation_Ind" length="1"/>
<property name="comInvitationForServiceInd" type="java.lang.String" column="Com_Invitation_For_Service_Ind" length="1"/>
<property name="comWillingToServeInd" type="java.lang.String" column="Com_Willing_To_Serve_Ind" length="1"/>
<property name="comUnavailableFromDate" type="java.sql.Timestamp" column="Com_Unavailable_From_Date" length="23"/>
<property name="comUnavailableToDate" type="java.sql.Timestamp" column="Com_Unavailable_To_Date" length="23"/>
<property name="comAppointedToId" type="java.lang.Integer" column="Com_Appointed_To_ID" length="5"/>
<property name="citizenshipType" type="java.lang.Integer" column="Citizenship_Type" length="4"/>
<property name="landedOnDate" type="java.sql.Timestamp" column="Landed_On_Date" length="23"/>
<property name="permResStatusInd" type="java.lang.String" column="Perm_Res_Status_Ind" length="1"/>
<property name="gender" type="java.lang.Integer" column="Gender" length="4"/>
<property name="correspondenceLanguageCode" type="java.lang.String" column="Correspondence_Language_Code" not-null="true" length="1"/>
<property name="readEnglish" type="java.lang.String" column="Read_English" not-null="true" length="1"/>
<property name="writeEnglish" type="java.lang.String" column="Write_English" length="1"/>
<property name="speakEnglish" type="java.lang.String" column="Speak_English" length="1"/>
<property name="auralEnglish" type="java.lang.String" column="Aural_English" length="1"/>
<property name="readFrench" type="java.lang.String" column="Read_French" length="1"/>
<property name="writeFrench" type="java.lang.String" column="Write_French" length="1"/>
<property name="speakFrench" type="java.lang.String" column="Speak_French" length="1"/>
<property name="auralFrench" type="java.lang.String" column="Aural_French" length="1"/>
<property name="otherLanguages" type="java.lang.String" column="Other_Languages" length="255"/>
<property name="cvUpdateDate" type="java.sql.Timestamp" column="CV_Update_Date" length="23"/>
<property name="cvKeywords" type="java.lang.String" column="CV_Keywords" length="255"/>
<property name="officerKeywords" type="java.lang.String" column="Officer_Keywords" length="255"/>
<property name="expertiseNote" type="java.lang.String" column="Expertise_Note" length="255"/>
<property name="includePeerReviewInd" type="java.lang.String" column="Include_Peer_Review_Ind" length="1"/>
<property name="phoneCountryCode" type="java.lang.String" column="Phone_Country_Code" length="3"/>
<property name="phoneAreaCode" type="java.lang.String" column="Phone_Area_Code" length="4"/>
<property name="phoneNumber" type="java.lang.String" column="Phone_Number" length="12"/>
<property name="phoneExtension" type="java.lang.String" column="Phone_Extension" length="5"/>
<property name="tmpPhoneCountryCode" type="java.lang.String" column="TMP_Phone_Country_Code" length="3"/>
<property name="tmpPhoneAreaCode" type="java.lang.String" column="TMP_Phone_Area_Code" length="4"/>
<property name="tmpPhoneNumber" type="java.lang.String" column="TMP_Phone_Number" length="12"/>
<property name="tmpPhoneExtension" type="java.lang.String" column="TMP_Phone_Extension" length="5"/>
<property name="secPhoneCountryCode" type="java.lang.String" column="Sec_Phone_Country_Code" length="3"/>
<property name="secPhoneAreaCode" type="java.lang.String" column="Sec_Phone_Area_Code" length="4"/>
<property name="secPhoneNumber" type="java.lang.String" column="Sec_Phone_Number" length="12"/>
<property name="secPhoneExtension" type="java.lang.String" column="Sec_Phone_Extension" length="5"/>
<property name="faxPhoneCountryCode" type="java.lang.String" column="FAX_Phone_Country_Code" length="3"/>
<property name="faxAreaCode" type="java.lang.String" column="FAX_Area_Code" length="4"/>
<property name="faxNumber" type="java.lang.String" column="FAX_Number" length="12"/>
<property name="faxPhoneExtension" type="java.lang.String" column="FAX_Phone_Extension" length="5"/>
<property name="tmpFaxCountryCode" type="java.lang.String" column="TMP_FAX_Country_Code" length="3"/>
<property name="tmpFaxPhoneAreaCode" type="java.lang.String" column="TMP_FAX_Phone_Area_Code" length="4"/>
<property name="tmpFaxPhoneNumber" type="java.lang.String" column="TMP_FAX_Phone_Number" length="12"/>
<property name="tmpFaxPhoneExtension" type="java.lang.String" column="TMP_FAX_Phone_Extension" length="5"/>
<property name="secFaxCountryCode" type="java.lang.String" column="Sec_Fax_Country_Code" length="3"/>
<property name="secFaxAreaCode" type="java.lang.String" column="Sec_Fax_Area_Code" length="4"/>
<property name="secFaxNumber" type="java.lang.String" column="Sec_Fax_Number" length="12"/>
<property name="secFaxExtension" type="java.lang.String" column="Sec_Fax_Extension" length="5"/>
<property name="emailAddress" type="java.lang.String" column="EMail_Address" length="100"/>
<property name="tmpEmailAddress" type="java.lang.String" column="TMP_EMail_Address" length="100"/>
<property name="scndEmailAddress" type="java.lang.String" column="Scnd_EMail_Address" length="100"/>
<property name="allTmpControlDateFrom" type="java.sql.Timestamp" column="All_TMP_Control_Date_From" length="23"/>
<property name="allTmpControlDateTo" type="java.sql.Timestamp" column="All_TMP_Control_Date_To" length="23"/>
<property name="createUserId" type="java.lang.String" column="Create_User_ID" not-null="true" length="3" insert="false" update="false"/>
<property name="createDate" type="java.sql.Timestamp" column="Create_Date" not-null="true" length="23" insert="false" update="false"/>
<property name="changeUserId" type="java.lang.String" column="Change_User_ID" not-null="true" length="3" insert="false" update="false"/>
<property name="changeDate" type="java.util.Date" column="Change_Date" not-null="true" length="23" insert="false" update="false"/>
<property name="newPersonInd" type="java.lang.String" column="New_Person_Ind" length="1"/>
<property name="alias" type="java.lang.String" column="Alias" length="100"/>
<property name="personConsentInd" type="java.lang.String" column="Person_Consent_Ind" length="1"/>
<property name="transferredToAmisInd" type="java.lang.String" column="Transferred_To_AMIS_Ind" length="1"/>
<property name="transferredDate" type="java.sql.Timestamp" column="Transferred_Date" length="23"/>
<property name="postalCode" type="java.lang.String" column="Postal_Code" length="6"/>
<property name="formStatus" type="java.lang.String" column="Form_Status" length="1"/>
<property name="formLanguage" type="java.lang.String" column="Form_Language" length="1"/>
<property name="landedYear" type="java.lang.String" column="Landed_Year" length="4"/>
<property name="landedMonth" type="java.lang.String" column="Landed_Month" length="2"/>
<property name="landedDay" type="java.lang.String" column="Landed_Day" length="2"/>
<property name="lastAccessDate" type="java.sql.Timestamp" column="Last_Access_Date" length="23"/>
<property name="previousFamilyName" type="java.lang.String" column="Previous_family_name" length="30"/>
<!-- associations -->
<!-- <property name="otherCountryCode" type="java.lang.Integer" column="Other_Country_Code" length="5"/> -->
<many-to-one name="otherCountryCode" class="hibernate.Country" column="Other_Country_Code" lazy="true" insert="false" update="false" fetch="join" not-found="ignore"> </many-to-one>
<!-- unidirectional one-to-many association to personPosition -->
<set name="personPosition">
<key column="CID"> </key>
<one-to-many class="hibernate.PersonPosition"/>
</set>
<!-- unidirectional one-to-many association to personAddress -->
<set name="personAddress">
<key column="CID"> </key>
<one-to-many class="hibernate.PersonAddress"/>
</set>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class name="hibernate.PersonPosition" table="PERSON_POSITION" lazy="true">
<id name="positionId" type="java.lang.Integer" column="Position_ID" unsaved-value="0">
<generator class="native"/>
</id>
<property name="cid" type="java.lang.Integer" column="CID" not-null="true" length="6"/>
<property name="positionType" type="java.lang.Integer" column="Position_Type" length="4"/>
<property name="primaryOrgInd" type="java.lang.String" column="Primary_Org_Ind" length="1"/>
<property name="salariedInd" type="java.lang.String" column="Salaried_Ind" length="1"/>
<property name="employmentType" type="java.lang.Integer" column="Employment_Type" length="4"/>
<property name="leaveOfAbsenceInd" type="java.lang.String" column="Leave_Of_Absence_Ind" length="1"/>
<property name="positionStartYear" type="java.lang.Short" column="Position_Start_Year" length="5"/>
<property name="positionEndYear" type="java.lang.Short" column="Position_End_Year" length="5"/>
<property name="otherOrgName" type="java.lang.String" column="Other_Org_Name" length="100"/>
<property name="otherDepartmentName" type="java.lang.String" column="Other_Department_Name" length="100"/>
<property name="otherPositionName" type="java.lang.String" column="Other_Position_Name" length="40"/>
<property name="addressTitleLine2" type="java.lang.String" column="Address_Title_Line2" length="40"/>
<property name="phoneCountryCode" type="java.lang.String" column="Phone_Country_Code" length="3"/>
<property name="phoneAreaCode" type="java.lang.String" column="Phone_Area_Code" length="4"/>
<property name="phoneNumber" type="java.lang.String" column="Phone_Number" length="12"/>
<property name="phoneExtension" type="java.lang.String" column="Phone_Extension" length="5"/>
<property name="faxCountryCode" type="java.lang.String" column="FAX_Country_Code" length="3"/>
<property name="faxAreaCode" type="java.lang.String" column="FAX_Area_Code" length="4"/>
<property name="faxNumber" type="java.lang.String" column="FAX_Number" length="12"/>
<property name="faxPhoneExtension" type="java.lang.String" column="FAX_Phone_Extension" length="5"/>
<property name="emailAddress" type="java.lang.String" column="EMail_Address" length="100"/>
<property name="scndEmailAddress" type="java.lang.String" column="Scnd_EMail_Address" length="100"/>
<property name="dateAppointed" type="java.sql.Timestamp" column="Date_Appointed" length="23"/>
<property name="personInd" type="java.lang.String" column="Person_Ind" length="1"/>
<property name="scndPhoneCountryCode" type="java.lang.String" column="Scnd_Phone_Country_Code" length="3"/>
<property name="scndPhoneAreaCode" type="java.lang.String" column="Scnd_Phone_Area_Code" length="4"/>
<property name="scndPhoneNumber" type="java.lang.String" column="Scnd_Phone_Number" length="12"/>
<property name="scndPhoneExtension" type="java.lang.String" column="Scnd_Phone_Extension" length="5"/>
<property name="scndFaxCountryCode" type="java.lang.String" column="Scnd_FAX_Country_Code" length="3"/>
<property name="scndFaxPhoneAreaCode" type="java.lang.String" column="Scnd_FAX_Phone_Area_Code" length="4"/>
<property name="scndFaxPhoneNumber" type="java.lang.String" column="Scnd_FAX_Phone_Number" length="12"/>
<property name="scndFaxPhoneExtension" type="java.lang.String" column="Scnd_FAX_Phone_Extension" length="5"/>
<property name="createUserId" type="java.lang.String" column="Create_User_ID" length="3" insert="false" update="false"/>
<property name="createDate" type="java.sql.Timestamp" column="Create_Date" length="23" insert="false" update="false"/>
<property name="changeUserId" type="java.lang.String" column="Change_User_ID" length="3" insert="false" update="false"/>
<property name="changeDate" type="java.sql.Timestamp" column="Change_Date" length="23" insert="false" update="false"/>
<property name="notCurrentlyRegistered" type="java.lang.String" column="Not_Currently_Registered" length="1"/>
<property name="positionStartMonth" type="java.lang.String" column="Position_Start_Month" length="2"/>
<property name="positionEndMonth" type="java.lang.String" column="Position_End_Month" length="2"/>
<property name="originalOrgId" type="java.lang.Integer" column="Original_Org_ID" length="8"/>
<property name="originalOrgDeptLocId" type="java.lang.Integer" column="Original_Org_Dept_Loc_ID" length="6"/>
<!-- associations -->
<!-- <property name="orgDeptLocId" type="java.lang.Integer" column="Org_Dept_Loc_ID" length="6"/> -->
<many-to-one name="orgDeptLocation" class="hibernate.OrgDeptLocation" column="Org_Dept_Loc_ID"> </many-to-one>
<!-- <property name="orgId" type="java.lang.Integer" column="Org_ID" length="8"/> -->
<many-to-one name="organization" class="hibernate.Organization" column="Org_ID"> </many-to-one>
<!-- <property name="positionNumber" type="java.lang.Integer" column="Position_Number" length="4"/> -->
<many-to-one name="positionNumber" class="hibernate.Cod" column="Position_Number"> </many-to-one>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by Pierre Massé
-->
<class name="hibernate.Organization" table="ORGANIZATION" mutable="false">
<cache usage="read-only"/>
<id name="orgId" type="java.lang.Integer" column="Org_ID">
<generator class="assigned"/>
</id>
<property name="parentOrgId" type="java.lang.Integer" column="Parent_Org_ID" length="8"/>
<property name="orgCategoryCode" type="int" column="Org_Category_Code" not-null="true" length="4"/>
<property name="federallyFundedInd" type="java.lang.String" column="Federally_Funded_Ind" not-null="true" length="1"/>
<property name="provinceStateCode" type="java.lang.String" column="Province_State_Code" length="2"/>
<property name="nameEnglish" type="java.lang.String" column="Name_English" not-null="true" length="100"/>
<property name="nameFrench" type="java.lang.String" column="Name_French" not-null="true" length="100"/>
<property name="acronymEnglish" type="java.lang.String" column="Acronym_English" not-null="true" length="40"/>
<property name="acronymFrench" type="java.lang.String" column="Acronym_French" not-null="true" length="40"/>
<property name="financeName" type="java.lang.String" column="Finance_Name" length="30"/>
<property name="languageCode" type="java.lang.String" column="Language_Code" length="1"/>
<property name="fellowshipScheduleType" type="java.lang.Integer" column="Fellowship_Schedule_Type" length="4"/>
<property name="grantScheduleType" type="java.lang.Integer" column="Grant_Schedule_Type" length="4"/>
<property name="orgStatusCode" type="int" column="Org_Status_Code" not-null="true" length="4"/>
<property name="kilometersFromClosestUniv" type="java.lang.Short" column="Kilometers_From_Closest_Univ" length="5"/>
<property name="sigEligibilityInd" type="java.lang.String" column="SIG_Eligibility_Ind" not-null="true" length="1"/>
<property name="publisherInd" type="java.lang.String" column="Publisher_Ind" not-null="true" length="1"/>
<property name="keywords" type="java.lang.String" column="Keywords" length="255"/>
<property name="globalPaymentInd" type="java.lang.String" column="Global_Payment_Ind" not-null="true" length="1"/>
<property name="journalFoundedYear" type="java.lang.Short" column="Journal_Founded_Year" length="5"/>
<property name="journalSelfAdminInd" type="java.lang.String" column="Journal_Self_Admin_Ind" length="1"/>
<property name="journalType" type="java.lang.Integer" column="Journal_Type" length="4"/>
<property name="journalLanguageEnglishInd" type="java.lang.String" column="Journal_Language_English_Ind" length="1"/>
<property name="journalLanguageFrenchInd" type="java.lang.String" column="Journal_Language_French_Ind" length="1"/>
<property name="journalLanguageOtherInd" type="java.lang.String" column="Journal_Language_Other_Ind" length="1"/>
<property name="journalLanguageOtherName" type="java.lang.String" column="Journal_Language_Other_Name" length="40"/>
<property name="createUserId" type="java.lang.String" column="Create_User_ID" length="3"/>
<property name="createDate" type="java.sql.Timestamp" column="Create_Date" length="23"/>
<property name="changeUserId" type="java.lang.String" column="Change_User_ID" length="3"/>
<property name="changeDate" type="java.sql.Timestamp" column="Change_Date" length="23"/>
<!-- associations -->
<many-to-one name="country" class="hibernate.Country" column="Country_Code" fetch="join" update="false" insert="false"> </many-to-one>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class name="hibernate.Cod" table="CODES" lazy="true">
<cache usage="read-only"/>
<id name="code" type="java.lang.Integer" column="Code">
<generator class="assigned"/>
</id>
<property name="codeType" type="java.lang.String" column="Code_Type" length="6"/>
<property name="sequenceNumber" type="java.lang.Integer" column="Sequence_Number" length="3"/>
<property name="activeInd" type="java.lang.String" column="Active_Ind" not-null="true" length="1"/>
<property name="amisUsageInd" type="java.lang.String" column="AMIS_Usage_Ind" length="1"/>
<property name="webUsageInd" type="java.lang.String" column="WEB_Usage_Ind" length="1"/>
<property name="shortNameEnglish" type="java.lang.String" column="Short_Name_English" not-null="true" length="40"/>
<property name="shortNameFrench" type="java.lang.String" column="Short_Name_French" not-null="true" length="40"/>
<property name="nameEnglish" type="java.lang.String" column="Name_English" length="255"/>
<property name="nameFrench" type="java.lang.String" column="Name_French" length="255"/>
<property name="comments" type="java.lang.String" column="Comments" length="255"/>
<property name="createDate" type="java.sql.Timestamp" column="Create_Date" not-null="true" length="23"/>
<property name="createUserId" type="java.lang.String" column="Create_User_ID" not-null="true" length="3"/>
<property name="changeDate" type="java.sql.Timestamp" column="Change_Date" not-null="true" length="23"/>
<property name="changeUserId" type="java.lang.String" column="Change_User_ID" not-null="true" length="3"/>
<!-- associations -->
<!-- bi-directional many-to-one association to CodesTabl -->
<many-to-one name="codesTablByCodeTableId" class="hibernate.CodesTabl" not-null="true">
<column name="Code_Table_ID"/>
</many-to-one>
<!-- bi-directional one-to-many association to CodesCategory -->
<set name="codesCategoriesByCode" lazy="true" inverse="true">
<key>
<column name="Code"/>
</key>
<one-to-many class="hibernate.CodesCategory"/>
</set>
<!-- bi-directional one-to-many association to ApplIneThem -->
<set name="applIneThemsBySubThemeCode" lazy="true" inverse="true">
<key>
<column name="Sub_Theme_Code"/>
</key>
<one-to-many class="hibernate.ApplIneThem"/>
</set>
<!-- bi-directional one-to-many association to ApplIneThem -->
<set name="applIneThemsByThemeCode" lazy="true" inverse="true">
<key>
<column name="Theme_Code"/>
</key>
<one-to-many class="hibernate.ApplIneThem"/>
</set>
<!-- bi-directional one-to-many association to FrrComment -->
<set name="frrCommentsBySatisfactionInd1" lazy="true" inverse="true">
<key>
<column name="Satisfaction_Ind_1"/>
</key>
<one-to-many class="hibernate.FrrComment"/>
</set>
<!-- bi-directional one-to-many association to FrrComment -->
<set name="frrCommentsBySatisfactionInd3" lazy="true" inverse="true">
<key>
<column name="Satisfaction_Ind_3"/>
</key>
<one-to-many class="hibernate.FrrComment"/>
</set>
<!-- bi-directional one-to-many association to FrrComment -->
<set name="frrCommentsBySatisfactionInd2" lazy="true" inverse="true">
<key>
<column name="Satisfaction_Ind_2"/>
</key>
<one-to-many class="hibernate.FrrComment"/>
</set>
<!-- bi-directional one-to-many association to FrrComment -->
<set name="frrCommentsBySatisfactionInd4" lazy="true" inverse="true">
<key>
<column name="Satisfaction_Ind_4"/>
</key>
<one-to-many class="hibernate.FrrComment"/>
</set>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin
http://boss.bekk.no/boss/middlegen/
http://hibernate.sourceforge.net/
-->
<class name="hibernate.OrgDeptLocation" table="ORG_DEPT_LOCATION" mutable="false">
<cache usage="read-only"/>
<id name="orgDeptLocId" type="java.lang.Integer" column="Org_Dept_Loc_ID">
<generator class="assigned"/>
</id>
<property name="orgId" type="int" column="Org_ID" not-null="true" length="8"/>
<property name="departmentCategoryCode" type="int" column="Department_Category_Code" not-null="true" length="4"/>
<property name="locationId" type="java.lang.Integer" column="Location_ID" not-null="true" length="4"/>
<property name="statusCode" type="int" column="Status_Code" not-null="true" length="4"/>
<property name="shortNameEnglish" type="java.lang.String" column="Short_Name_English" length="60"/>
<property name="shortNameFrench" type="java.lang.String" column="Short_Name_French" length="60"/>
<property name="departmentNameEnglish" type="java.lang.String" column="Department_Name_English" not-null="true" length="100"/>
<property name="departmentNameFrench" type="java.lang.String" column="Department_Name_French" not-null="true" length="100"/>
<property name="statusChangedDate" type="java.sql.Timestamp" column="Status_Changed_Date" not-null="true" length="23"/>
<property name="sigDeptFulltimeTeachers" type="java.lang.Short" column="SIG_Dept_Fulltime_Teachers" length="5"/>
<property name="fmsVendorCode" type="java.lang.String" column="FMS_Vendor_Code" length="9"/>
<property name="emailAddress" type="java.lang.String" column="EMail_Address" length="100"/>
<property name="phoneCountryCode" type="java.lang.String" column="Phone_Country_Code" length="3"/>
<property name="phoneAreaCode" type="java.lang.String" column="Phone_Area_Code" length="4"/>
<property name="phoneNumber" type="java.lang.String" column="Phone_Number" length="12"/>
<property name="phoneExtension" type="java.lang.String" column="Phone_Extension" length="5"/>
<property name="faxPhoneCountryCode" type="java.lang.String" column="FAX_Phone_Country_Code" length="3"/>
<property name="faxAreaCode" type="java.lang.String" column="FAX_Area_Code" length="4"/>
<property name="faxNumber" type="java.lang.String" column="FAX_Number" length="12"/>
<property name="faxPhoneExtension" type="java.lang.String" column="FAX_Phone_Extension" length="5"/>
<property name="deptWebAddress" type="java.lang.String" column="Dept_Web_Address" length="100"/>
<property name="createUserId" type="java.lang.String" column="Create_User_ID" length="3"/>
<property name="createDate" type="java.sql.Timestamp" column="Create_Date" length="23"/>
<property name="changeUserId" type="java.lang.String" column="Change_User_ID" length="3"/>
<property name="changeDate" type="java.sql.Timestamp" column="Change_Date" length="23"/>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:
ERROR [TP-Processor3] (JDBCExceptionReporter.java:72) - Select expression results in more than one column having same name. Column name 'Org1_3_' is specified more than once
ERROR [TP-Processor3] (JDBCExceptionReporter.java:72) - Select expression results in more than one column having same name. Column name 'Org1_3_' is specified more than once
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1596)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at ca.sshrc.web.forms.beans.cv.ExperienceBean.retrieve(ExperienceBean.java:171)
at ca.sshrc.web.forms.beans.cv.ExperienceBean.<init>(ExperienceBean.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at java.beans.Beans.instantiate(Beans.java:204)
at java.beans.Beans.instantiate(Beans.java:48)
at com.sun.faces.config.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:203)
at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:256)
at com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)
at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:146)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:386)
at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1018)
at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1045)
at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:742)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:423)
at com.sun.faces.taglib.html_basic.DataTableTag.doStartTag(DataTableTag.java:473)
at org.apache.jsp.JSP.CV.ExperienceBody_jsp._jspx_meth_h_dataTable_0(ExperienceBody_jsp.java:383)
at org.apache.jsp.JSP.CV.ExperienceBody_jsp._jspx_meth_f_subview_0(ExperienceBody_jsp.java:184)
at org.apache.jsp.JSP.CV.ExperienceBody_jsp._jspService(ExperienceBody_jsp.java:131)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at ca.sshrc.web.common.tags.templates.GetTag.doStartTag(GetTag.java:47)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspx_meth_template_get_2(CVLayout_jsp.java:977)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspx_meth_htm_td_5(CVLayout_jsp.java:942)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspx_meth_htm_tr_1(CVLayout_jsp.java:850)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspx_meth_htm_table_1(CVLayout_jsp.java:814)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspx_meth_h_form_0(CVLayout_jsp.java:421)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspx_meth_htm_body_0(CVLayout_jsp.java:344)
at org.apache.jsp.JSP.layouts.CVLayout_jsp._jspService(CVLayout_jsp.java:167)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
at ca.sshrc.web.common.tags.templates.InsertTag.doEndTag(InsertTag.java:23)
at org.apache.jsp.JSP.CV.Experience_jsp._jspx_meth_template_insert_0(Experience_jsp.java:171)
at org.apache.jsp.JSP.CV.Experience_jsp._jspx_meth_f_view_0(Experience_jsp.java:115)
at org.apache.jsp.JSP.CV.Experience_jsp._jspService(Experience_jsp.java:80)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at ca.sshrc.web.common.services.filters.GZIPFilter.doFilter(GZIPFilter.java:20)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at ca.sshrc.web.common.services.filters.NavigationFilter.doFilter(NavigationFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at ca.sshrc.web.common.services.filters.SessionExpiredFilter.doFilter(SessionExpiredFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Select expression results in more than one column having same name. Column name 'Org1_3_' is specified more than once
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2636)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1996)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:204)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:187)
at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1510)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1495)
at com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:70)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
at org.hibernate.loader.Loader.doQuery(Loader.java:391)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
... 123 more
Name and version of the database you are using:Sybase 12.0.0.1
The generated SQL (show_sql=true):
Hibernate: select personposi2_.Position_ID as col_0_0_, personposi2_.CID as col_1_0_, personposi2_.Org_Dept_Loc_ID as col_2_0_, personposi2_.Position_Number as col_3_0_, personposi2_.Position_Start_Year as col_4_0_, personposi2_.Position_End_Year as col_5_0_, personposi2_.Other_Org_Name as col_6_0_, personposi2_.Other_Department_Name as col_7_0_, personposi2_.Other_Position_Name as col_8_0_, personposi2_.Org_ID as col_9_0_, cod4_.Short_Name_English as col_10_0_, cod4_.Short_Name_French as col_11_0_, organizati3_.Name_English as col_12_0_, organizati3_.Name_French as col_13_0_, orgdeptloc5_.Department_Name_English as col_14_0_, orgdeptloc5_.Department_Name_French as col_15_0_, personposi2_.Position_ID as Position1_2_, organizati3_.Org_ID as Org1_3_, cod4_.Code as Code4_, orgdeptloc5_.Org_Dept_Loc_ID as Org1_5_, personposi2_.Position_ID as Position1_0_, organizati3_.Org_ID as Org1_1_, cod4_.Code as Code2_, orgdeptloc5_.Org_Dept_Loc_ID as Org1_3_, personposi2_.CID as CID60_0_, personposi2_.Position_Type as Position3_60_0_, personposi2_.Primary_Org_Ind as Primary4_60_0_, personposi2_.Salaried_Ind as Salaried5_60_0_, personposi2_.Employment_Type as Employment6_60_0_, personposi2_.Leave_Of_Absence_Ind as Leave7_60_0_, personposi2_.Position_Start_Year as Position8_60_0_, personposi2_.Position_End_Year as Position9_60_0_, personposi2_.Other_Org_Name as Other10_60_0_, personposi2_.Other_Department_Name as Other11_60_0_, personposi2_.Other_Position_Name as Other12_60_0_, personposi2_.Address_Title_Line2 as Address13_60_0_, personposi2_.Phone_Country_Code as Phone14_60_0_, personposi2_.Phone_Area_Code as Phone15_60_0_, personposi2_.Phone_Number as Phone16_60_0_, personposi2_.Phone_Extension as Phone17_60_0_, personposi2_.FAX_Country_Code as FAX18_60_0_, personposi2_.FAX_Area_Code as FAX19_60_0_, personposi2_.FAX_Number as FAX20_60_0_, personposi2_.FAX_Phone_Extension as FAX21_60_0_, personposi2_.EMail_Address as EMail22_60_0_, personposi2_.Scnd_EMail_Address as Scnd23_60_0_, personposi2_.Date_Appointed as Date24_60_0_, personposi2_.Person_Ind as Person25_60_0_, personposi2_.Scnd_Phone_Country_Code as Scnd26_60_0_, personposi2_.Scnd_Phone_Area_Code as Scnd27_60_0_, personposi2_.Scnd_Phone_Number as Scnd28_60_0_, personposi2_.Scnd_Phone_Extension as Scnd29_60_0_, personposi2_.Scnd_FAX_Country_Code as Scnd30_60_0_, personposi2_.Scnd_FAX_Phone_Area_Code as Scnd31_60_0_, personposi2_.Scnd_FAX_Phone_Number as Scnd32_60_0_, personposi2_.Scnd_FAX_Phone_Extension as Scnd33_60_0_, personposi2_.Create_User_ID as Create34_60_0_, personposi2_.Create_Date as Create35_60_0_, personposi2_.Change_User_ID as Change36_60_0_, personposi2_.Change_Date as Change37_60_0_, personposi2_.Not_Currently_Registered as Not38_60_0_, personposi2_.Position_Start_Month as Position39_60_0_, personposi2_.Position_End_Month as Position40_60_0_, personposi2_.Original_Org_ID as Original41_60_0_, personposi2_.Original_Org_Dept_Loc_ID as Original42_60_0_, personposi2_.Org_Dept_Loc_ID as Org43_60_0_, personposi2_.Org_ID as Org44_60_0_, personposi2_.Position_Number as Position45_60_0_, personposi2_.CID as CID0__, personposi2_.Position_ID as Position1_0__, organizati3_.Parent_Org_ID as Parent2_47_1_, organizati3_.Org_Category_Code as Org3_47_1_, organizati3_.Federally_Funded_Ind as Federally4_47_1_, organizati3_.Province_State_Code as Province5_47_1_, organizati3_.Name_English as Name6_47_1_, organizati3_.Name_French as Name7_47_1_, organizati3_.Acronym_English as Acronym8_47_1_, organizati3_.Acronym_French as Acronym9_47_1_, organizati3_.Finance_Name as Finance10_47_1_, organizati3_.Language_Code as Language11_47_1_, organizati3_.Fellowship_Schedule_Type as Fellowship12_47_1_, organizati3_.Grant_Schedule_Type as Grant13_47_1_, organizati3_.Org_Status_Code as Org14_47_1_, organizati3_.Kilometers_From_Closest_Univ as Kilometers15_47_1_, organizati3_.SIG_Eligibility_Ind as SIG16_47_1_, organizati3_.Publisher_Ind as Publisher17_47_1_, organizati3_.Keywords as Keywords47_1_, organizati3_.Global_Payment_Ind as Global19_47_1_, organizati3_.Journal_Founded_Year as Journal20_47_1_, organizati3_.Journal_Self_Admin_Ind as Journal21_47_1_, organizati3_.Journal_Type as Journal22_47_1_, organizati3_.Journal_Language_English_Ind as Journal23_47_1_, organizati3_.Journal_Language_French_Ind as Journal24_47_1_, organizati3_.Journal_Language_Other_Ind as Journal25_47_1_, organizati3_.Journal_Language_Other_Name as Journal26_47_1_, organizati3_.Create_User_ID as Create27_47_1_, organizati3_.Create_Date as Create28_47_1_, organizati3_.Change_User_ID as Change29_47_1_, organizati3_.Change_Date as Change30_47_1_, organizati3_.Country_Code as Country31_47_1_, cod4_.Code_Type as Code2_25_2_, cod4_.Sequence_Number as Sequence3_25_2_, cod4_.Active_Ind as Active4_25_2_, cod4_.AMIS_Usage_Ind as AMIS5_25_2_, cod4_.WEB_Usage_Ind as WEB6_25_2_, cod4_.Short_Name_English as Short7_25_2_, cod4_.Short_Name_French as Short8_25_2_, cod4_.Name_English as Name9_25_2_, cod4_.Name_French as Name10_25_2_, cod4_.Comments as Comments25_2_, cod4_.Create_Date as Create12_25_2_, cod4_.Create_User_ID as Create13_25_2_, cod4_.Change_Date as Change14_25_2_, cod4_.Change_User_ID as Change15_25_2_, cod4_.Code_Table_ID as Code16_25_2_, orgdeptloc5_.Org_ID as Org2_48_3_, orgdeptloc5_.Department_Category_Code as Department3_48_3_, orgdeptloc5_.Location_ID as Location4_48_3_, orgdeptloc5_.Status_Code as Status5_48_3_, orgdeptloc5_.Short_Name_English as Short6_48_3_, orgdeptloc5_.Short_Name_French as Short7_48_3_, orgdeptloc5_.Department_Name_English as Department8_48_3_, orgdeptloc5_.Department_Name_French as Department9_48_3_, orgdeptloc5_.Status_Changed_Date as Status10_48_3_, orgdeptloc5_.SIG_Dept_Fulltime_Teachers as SIG11_48_3_, orgdeptloc5_.FMS_Vendor_Code as FMS12_48_3_, orgdeptloc5_.EMail_Address as EMail13_48_3_, orgdeptloc5_.Phone_Country_Code as Phone14_48_3_, orgdeptloc5_.Phone_Area_Code as Phone15_48_3_, orgdeptloc5_.Phone_Number as Phone16_48_3_, orgdeptloc5_.Phone_Extension as Phone17_48_3_, orgdeptloc5_.FAX_Phone_Country_Code as FAX18_48_3_, orgdeptloc5_.FAX_Area_Code as FAX19_48_3_, orgdeptloc5_.FAX_Number as FAX20_48_3_, orgdeptloc5_.FAX_Phone_Extension as FAX21_48_3_, orgdeptloc5_.Dept_Web_Address as Dept22_48_3_, orgdeptloc5_.Create_User_ID as Create23_48_3_, orgdeptloc5_.Create_Date as Create24_48_3_, orgdeptloc5_.Change_User_ID as Change25_48_3_, orgdeptloc5_.Change_Date as Change26_48_3_ from FORMS form0_ inner join PERSON person1_ on form0_.CID=person1_.CID left outer join PERSON_POSITION personposi2_ on person1_.CID=personposi2_.CID left outer join ORGANIZATION organizati3_ on personposi2_.Org_ID=organizati3_.Org_ID left outer join CODES cod4_ on personposi2_.Position_Number=cod4_.Code left outer join ORG_DEPT_LOCATION orgdeptloc5_ on personposi2_.Org_Dept_Loc_ID=orgdeptloc5_.Org_Dept_Loc_ID where form0_.Form_ID=? and personposi2_.Primary_Org_Ind='N' order by personposi2_.Position_End_Year DESC, personposi2_.Position_Start_Year DESC