Hello,
I am trying to deploy a JEE application working OK on JBoss 5 to Glassfish v3, which uses Hibernate 3.5ß2.
In my app I have a Form EJB with a relation to FormField EJBs. Both EJBs have a field named "date". I get:
Code:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'date' in field list is ambiguous
exception (as I said, I have no problem with JBoss 5 built in Hibernate).
Generated SQL:
Quote:
select form0_.id as id344_3_, form0_.confirmationText as confirma2_344_3_, date as date344_3_, form0_.description as descript4_344_3_, form0_.infomail as infomail344_3_, form0_.language as language344_3_, form0_.name as name344_3_, form0_.portal_id as portal9_344_3_, form0_.sibling_id as sibling10_344_3_, form0_.siteContactForm as siteCont8_344_3_, fields1_.form_id as form8_5_, fields1_.id as id5_, fields1_.id as id323_0_, fields1_.description as descript2_323_0_, fields1_.form_id as form8_323_0_, fields1_.formFile as formFile323_0_, fields1_.maxLength as maxLength323_0_, fields1_.name as name323_0_, fields1_.orderIndex as orderIndex323_0_, fields1_.required as required323_0_, portal2_.id as id316_1_, portal2_.description as descript2_316_1_, portal2_.homeurl as homeurl316_1_, portal2_.language as language316_1_, portal2_.lastAccessed as lastAcce5_316_1_, portal2_.name as name316_1_, portal2_.newUserNotification as newUserN7_316_1_, portal2_.requiresSignupConfirmation as requires8_316_1_, portal2_.sessionRememberDays as sessionR9_316_1_, portal2_.userSelfSignup as userSel10_316_1_, form3_.id as id344_2_, form3_.confirmationText as confirma2_344_2_, date as date344_2_, form3_.description as descript4_344_2_, form3_.infomail as infomail344_2_, form3_.language as language344_2_, form3_.name as name344_2_, form3_.portal_id as portal9_344_2_, form3_.sibling_id as sibling10_344_2_, form3_.siteContactForm as siteCont8_344_2_ from Form form0_ left outer join FormField fields1_ on form0_.id=fields1_.form_id inner join Portal portal2_ on form0_.portal_id=portal2_.id left outer join Form form3_ on form0_.sibling_id=form3_.id where form0_.id=2
This is generated SQL so I cannot easily modify it. Any ideas/help on how to solve this generated SQL problem?
Thanks,
Ignacio