This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
  • Carey Brown
  • salvin francis
  • Claude Moore

How to map a class that has an object that is defined as @Embeddable  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class called Organization. This Organization class has 4 fields that are of type EPhoneEntry. This EPhoneEntry class has an annotation above the class declaration of @Embeddable. Anyone have an example of how to create the hbm.XML mapping file for a class similar to my organization class? My problem is when I run a piece of HQL within the "HQL Console" in the "IntelliJ IDEA" IDE it returns this error:

hql> from AdminValue
java.lang.RuntimeException: org.hibernate.MappingException: Repeated column in mapping for entity: com.bah.englink.ejb.Organization column: phoneType_ID (should be mapped with insert="false" update="false")
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(
at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(
at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(
at org.hibernate.mapping.PersistentClass.checkColumnDuplication(
at org.hibernate.mapping.PersistentClass.validate(
at org.hibernate.mapping.RootClass.validate(
at org.hibernate.cfg.Configuration.validate(
at org.hibernate.cfg.Configuration.buildSessionFactory(
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(

neither the Organization or the EPhoneEntry class contain a field (phoneType_ID) that is mentioned in the above error but I'm quessing that this problem stems from me mapping the Organization class wrong. I mapped the Organization class as follows in my "" files:

and this is the EPhoneEntry class:
Hey cool! They got a blimp! But I have a tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!