• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Repeated column in mapping for entity

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
if I postulated in this forum, it is that I did not find a solution elsewhere
here my code:
TermProjPK.java
TermProj.java

TermSource.java

SnomedInter.java

I always have the same error:


were there any suggestions made? Any help is greatly appreciated
 
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dupon David:
[QB]


TermProj.java



I believe that you have a repeated column definition here. Try a different name for one of them...
 
Dupon David
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I changed my table for the keys are different but I always have the same problem
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dupon David:
I changed my table for the keys are different but I always have the same problem



With the same column name in the exception?
Looks like there are just too many things named "auis" in your code fragment, and by changing them one by one you can see which ones are causing the problem...
 
Dupon David
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

With the same column name in the exception?

Yes

Looks like there are just too many things named "auis" in your code fragment, and by changing them one by one you can see which ones are causing the problem...

thank you, it is what I have make, and I put :in TermProj entity and in TermProjPk class.
and now I have the following error

there are other people who have the same error that me, but they did not have an answer


http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3994778http://forum.hibernate.org/viewtopic.php?t=967702&sid=5ffcb0cf915bf975182e97b24eea1741

were there any suggestions made? Any help is greatly appreciated
[ December 20, 2006: Message edited by: Dupon David ]
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Through the two member variables, you are trying to make two columns "AUIS" in the table corresponding to the TermProj entity. Rename the columns, or refactor the class
 
Dupon David
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello
I changed the name of the primary key in SnomedInter I put SNOMEDINTER_AUIS at the place of AUIS, in the same way for TERMSOURCE_AUIW in the place of AUIW to avoid having the same name as the key foreign in TermProj, my code became as follows:
TermProjPK.java

TermProj.java

TermSource.java


SnomedInter.java


this time I have the following error:


were there any suggestions made? Any help is greatly appreciated
 
Dupon David
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
were there any suggestions made? Any help is greatly appreciated
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

The problem seems not to be in you entities mapping, but when you try to find an entity by calling getReference method of EntityManager ?

Please send us more code !

Good luck

Cyril
 
Dupon David
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
In the Session Bean TermProjFacade.java i have:
And to test, i use this servlet:

I remain at your disposal, for more information, thank you very much
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic