-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Repeated column in mapping for entity ERROR PLEASE HELP..
PostPosted: Sat Aug 06, 2011 3:00 am 
Newbie

Joined: Sat Aug 06, 2011 2:48 am
Posts: 1
This is my entity configurations..
Code:
  @Entity
  @Table(name = "VSS_FILE_HEADER")
  public class PatchVO implements Serializable{
   
   @Id
   @GeneratedValue(strategy=GenerationType.SEQUENCE,generator="my_entity_seq_gen")
   @SequenceGenerator(name="my_entity_seq_gen", sequenceName="VSS_FILE_HEADER_SEQ")
   @Column(name="VSS_ID")
   private Long vssId;
   @Column(name="FILE_NAME")
   private String fileName;
   
   @OneToMany(cascade=CascadeType.ALL)
   @JoinColumn(name = "VSS_ID",insertable=false,updatable=false,nullable=false)
   private List <VssArtifactVO> vssArtifacts;

--------------------------------------------------------------------
@Entity
@Table(name = "VSS_ARTIFACTS")
public class VssArtifactVO implements Serializable {
   
   @EmbeddedId
   private CompoundKey id;
   
   @Transient
   private Long artifactSeq;
   
   
   

   @Embeddable   
   public static class CompoundKey implements Serializable{
      
      
        @Column(name="VSS_ID")
        private Long vssId;
        @Column(name="ART_TYPE_ID")
        private Integer artifactTypeId;
        @Column(name="ARTIFACT_NAME")
        private String artifactName;
        public CompoundKey() {}
        public CompoundKey(Long vssId,Integer artifactTypeId,String artifactName) {
           this.vssId=vssId;
           this.artifactTypeId=artifactTypeId;
           this.artifactName=artifactName;
        }
      
      
    
    
   }

}



But i am getting the following error
Repeated column in mapping for entity: om.gov.moh.phs.patch.vo.VssArtifactVO column: VSS_ID (should be mapped with insert="false" update="false");

How can I solve this issue?.. I cannot give VSS_ID as insertable=false,updatable=false because this is a composit key in VssArtifactVO ..
Please help...

Thanx in Advnce
Abdul Jaleel C


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.