-->
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: org.hibernate.MappingException Could not determine type
PostPosted: Sun May 23, 2010 5:23 am 
Newbie

Joined: Sun May 23, 2010 4:57 am
Posts: 1
I have three tables as given below
TT_DATES
TT_DATE_ID (PK)
TT_DATE
DATE_RANGES
DATE_RANGE_ID(PK)
START_RANGE
END_RANGE
DATE_RANGE_EXCEPTIONS
TT_DATE_ID(PK)(FK)
DATE_RANGE_ID (PK)(FK)

I have generated annotated classes using xjb for the first two tables. But for the third table I could not generate annotated class using XJB as I am not clear as to how a composite primary key and foreign key combination could be represented in an XJB. So I have tried writing annotated classes manually for the 3rd table. Bust even this doesnot seem to work . It gives me HibernateMappingException.

Could not determine type for: datatypes.TransitTimeDateRange, for columns: [org.hibernate.mapping.Column(DateRange)

Could someone please suggest how I should write the annotated class for the 3rd table



DateRangeException :

Code:
         
@Entity
        @Table(name = "DATE_RANGE_EXCEPTIONS")
   
private DateRange dateRange;
               private TTDate tt_date;
                  @Id
                  @Basic(fetch = FetchType.LAZY)
                  @ManyToOne
                  @JoinColumn(name = "DATE_RANGE_ID")
          public DateRange getTransitTimeDateRange() {
                  return dateRange;
              }

              public void setDateRange(DateRange dateRange) {
                  this.dateRange = dateRange;
              }

                  @Id
                  @Basic(fetch = FetchType.LAZY)
                  @ManyToOne
                  @JoinColumn(name = "TT_DATE_ID")
          public TTDate getttDate() {
                  return tt_date;
              }

              public void setttDate(TTDate tt_date) {
                  this.tt_date = tt_date;
              }


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.